I couldn't see one of these after googling for it...
#!/bin/bash
### BEGIN INIT INFO
# Provides: pyclustercheck
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Start pyclustercheck daemon
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/lsb/init-functions
LOG=/var/log/pyclustercheck
DAEMON=/usr/bin/pyclustercheck
PIDFILE=/var/run/pyclustercheck.pid
ARGS=""
test -x $DAEMON || exit 5
if [ -r /etc/default/pyclustercheck ]; then
. /etc/default/pyclustercheck
fi
case $1 in
start)
log_daemon_msg "Starting pyclustercheck server" "pyclustercheck"
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --background --make-pidfile --startas $DAEMON -- $ARGS
status=$?
log_end_msg $status
;;
stop)
log_daemon_msg "Stopping pyclustercheck server" "pyclustercheck"
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
log_end_msg $?
rm -f $PIDFILE
;;
restart|force-reload)
$0 stop && sleep 2 && $0 start
;;
try-restart)
if $0 status >/dev/null; then
$0 restart
else
exit 0
fi
;;
reload)
exit 3
;;
status)
status_of_proc $DAEMON "pyclustercheck server"
;;
*)
echo "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
exit 2
;;
esac
james_@