This is my code:
#!/bin/bash
daemon="$APPVENV/bin/uwsgi"
args="--emperor $APPCONF/uwsgi/app.ini"
pid="$APPDIR/emperor.pid"
case "\$1" in
start)
echo "Starting uwsgi"
start-stop-daemon -m -p \$pid --start --exec \$daemon -- \$args
;;
stop)
echo "Stopping script uwsgi"
start-stop-daemon --signal INT -p \$pid --stop \$daemon -- \$args
;;
reload)
echo "Reloading conf"
kill -HUP \$(< \$pid)
;;
*)
echo "Usage: /etc/init.d/uwsgi {start|stop|reload}"
exit 1
;;
esac
exit 0
When I try to use it, it says I'm missing LSB tags and overrides. I googles it and found this as an example:
### BEGIN INIT INFO
# Provides: scriptname
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
I'm confused though, about firstly the remote_fs and syslog variables, is this something I need to keep as default? Secondly, how so I know what numbers I should be putting for default start and stop?