2012-08-11 09:12:06 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
mkdir -p /var/log/supervisor
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting supervisord: "
|
2012-08-11 09:12:06 +02:00
|
|
|
start-stop-daemon -S -q -p /var/run/supervisord.pid --exec /usr/bin/supervisord
|
|
|
|
echo "done"
|
|
|
|
;;
|
|
|
|
stop)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping supervisord: "
|
2012-08-11 09:12:06 +02:00
|
|
|
start-stop-daemon -K -q -p /var/run/supervisord.pid
|
|
|
|
echo "done"
|
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
"$0" stop
|
|
|
|
sleep 5
|
|
|
|
"$0" start
|
|
|
|
;;
|
|
|
|
reload)
|
|
|
|
start-stop-daemon -K -q -p /var/run/supervisord.pid -s HUP
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart|reload}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|