Debian startup script 2
From SqueezeboxWiki
Revision as of 05:05, 29 June 2010 by Soulkeeper (Talk | contribs)
#!/bin/sh# slimserver init script for Debian Linux## This script expects slimserver to be installed in# /home/slimserver#DAEMON=/home/slimserver/slimserver.plPIDFILE=/var/tmp/slimserver.pidLOGFILE=/var/log/slimserver.logUSER=slimserverSLIMSERVER_OPTS=""test -x ${DAEMON} || exit 0case "$1" in start) echo -n "Starting Slimserver: " HOME=/home/$USER start-stop-daemon --start --quiet --exec $DAEMON \ --chuid ${USER} -- --daemon \ --prefsfile=/etc/slimserver.pref --pidfile=${PIDFILE} \ --logfile=${LOGFILE} ${SLIMSERVER_OPTS} echo "slimserver" ;; stop) echo -n "Stopping Slimserver: " start-stop-daemon --stop --quiet --user ${USER} --pidfile ${PIDFILE} --retry 5 echo "done" ;; force-reload|restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" exit 1; ;;esacexit 0