You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
738 B
34 lines
738 B
#!/bin/bash
|
|
PIDFILE=/home/devssh/public_html/lmmc-dev/shcron/close_and_open_event/caoepid.pid
|
|
|
|
if [ -f $PIDFILE ]
|
|
then
|
|
PID=$(cat $PIDFILE)
|
|
ps -p $PID > /dev/null 2>&1
|
|
php /home/devssh/public_html/lmmc-dev/index.php Background_service auto_close_and_open_event "lemodeFRWlogx0d@2016" >> /home/devssh/public_html/lmmc-dev/shcron/close_and_open_event/caoelog.log
|
|
|
|
if [ $? -eq 0 ]
|
|
then
|
|
echo "Process already running"
|
|
exit 1
|
|
else
|
|
## Process not found assume not running
|
|
echo $$ > $PIDFILE
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "Could not create PID file"
|
|
exit 1
|
|
fi
|
|
fi
|
|
else
|
|
echo $$ > $PIDFILE
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "Could not create PID file"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
#sleep 25d
|
|
#rm $PIDFILE
|
|
|
|
|