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.
 
 
 
 
 
 

33 lines
716 B

#!/bin/bash
PIDFILE=/home/devssh/public_html/lmmc-dev/shcron/workshop_informer/email/rpid.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 run_service_011 150 5 "dev" >> /home/devssh/public_html/lmmc-dev/shcron/workshop_informer/email/rlog.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