#!/bin/bash PIDFILE=/var/run/camwho.pid DAEMON="/bin/bash /opt/camwho/camwho" case "$1" in start) start-stop-daemon -S -mp $PIDFILE -x $DAEMON -b ;; stop) start-stop-daemon -K -p $PIDFILE -x $DAEMON ;; restart) "$0" stop "$0" start ;; *) echo "Usage: $0 (start|stop|restart)" ;; esac