Commit 50f6c42d by Oliver Pinter

improve the init script

parent a4d18851
......@@ -19,14 +19,28 @@ do_start()
{
PATH=${PATH}:/usr/local/bin/
printf "start ${name}: "
/usr/sbin/daemon -P ${pidfile} -r /usr/local/bin/python /root/agent/agent.py
ret=$?
if [ "${ret}" = "0" ]
then
echo "done."
else
echo "failed..."
fi
}
do_stop()
{
printf "stop ${name}: "
if [ -f ${pidfile} ]
then
kill `cat ${pidfile}`
echo "done."
else
echo "not running..."
return 1
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment