Kerala Cyber Warriors
KCW Uploader V1.1

Path : /opt/cpguard/app/crons/
File Upload :
Current File : //opt/cpguard/app/crons/restart.sh

#!/bin/sh
if ps -p `cat /opt/cpguard/app/crons/.pid` > /dev/null
then
    echo "Restarting cpguard-agent"    
else
    echo "Starting cpguard-agent"
fi

#cleanup

pkill -f cpguard\-agent

> /opt/cpguard/logs/worker_output
rm -f  /dev/shm/Sync_Event*CpgTask*

#start worker
/opt/cpguard/app/crons/worker.php >> /opt/cpguard/logs/worker_output 2>&1 &

sleep 1

if ps -p `cat /opt/cpguard/app/crons/.pid` > /dev/null
then
    echo "Start success PID : " `cat /opt/cpguard/app/crons/.pid`
else
    echo "Start failed!"
fi



-=[ KCW uplo4d3r c0ded by cJ_n4p573r ]=-
Ⓒ2017 ҠЄГѦLѦ СүѣЄГ ЩѦГГіѺГՏ