#! /bin/sh # # ices2 # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/ices2 NAME=ices2 DESC=ices2 test -x $DAEMON || exit 0 # Defaults #line-in recorder CONFIGFILE="/etc/ices2/reboot.fm_enc0der.xml" #backup recording on decoder #CONFIGFILE="/etc/ices2/reboot.fm_decoder_backup.xml" set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \ --background --exec $DAEMON -- $CONFIGFILE echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --oknodo --quiet --exec $DAEMON echo "$NAME." ;; restart) echo -n "Restarting $DESC: " $0 stop sleep 1 $0 start echo "$NAME." ;; *) echo "Usage: $0 {start|stop|restart)" >&2 exit 1 ;; esac exit 0