[svn r948] Added new function to retrieve old schedules in order to reactivate them
9 LOGFILE=/var/log/gms.log
12 DESC="GMyth transcode server"
14 test -x $DAEMON || exit 0
15 . /lib/lsb/init-functions
18 # Source defaults file; edit that file to configure this script.
24 if [ ! -d $PIDDIR ]; then
26 chown $DAEMONUSER $PIDDIR
27 chgrp $DAEMONUSER $PIDDIR
29 if [ -e $PIDFILE ]; then
30 PIDDIR=/proc/$(cat $PIDFILE)
31 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
32 log_success_msg "$DESC already started; not starting."
35 log_success_msg "Removing stale PID file $PIDFILE."
40 log_daemon_msg "Starting $DESC" "$NAME"
41 start-stop-daemon --start --quiet --pidfile $PIDFILE \
42 --user $DAEMONUSER --exec $DAEMON -- $PARAMS
48 log_daemon_msg "Stopping $DESC" "$NAME"
49 start-stop-daemon --stop --retry 60 --quiet --oknodo --pidfile $PIDFILE \
70 echo "Usage: /etc/init.d/$NAME {start|stop|restart}" >&2