diff options
author | Michael Hanson <hansonorders@verison.net> | 2010-03-22 19:37:16 (GMT) |
---|---|---|
committer | Michael Hanson <hansonorders@verison.net> | 2010-03-22 19:37:16 (GMT) |
commit | 21383e4ca51bc151601a51e6d75885959deb89e1 (patch) | |
tree | f9c1e3739098b700c0e0421c069ae926cc1b8cc2 /abs/extra-testing/community/squeezeboxserver/squeezeboxserver.rc | |
parent | dbff62a9a2550bd0bed77860fa4164d74c90dfb3 (diff) | |
parent | e51cf415764a2c267f373965c48eec082ad59d81 (diff) | |
download | linhes_pkgbuild-21383e4ca51bc151601a51e6d75885959deb89e1.zip linhes_pkgbuild-21383e4ca51bc151601a51e6d75885959deb89e1.tar.gz linhes_pkgbuild-21383e4ca51bc151601a51e6d75885959deb89e1.tar.bz2 |
Merge branch 'master' of mihanson@knoppmyth.net:LinHES-PKGBUILD
Diffstat (limited to 'abs/extra-testing/community/squeezeboxserver/squeezeboxserver.rc')
-rw-r--r-- | abs/extra-testing/community/squeezeboxserver/squeezeboxserver.rc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/abs/extra-testing/community/squeezeboxserver/squeezeboxserver.rc b/abs/extra-testing/community/squeezeboxserver/squeezeboxserver.rc new file mode 100644 index 0000000..d33db16 --- /dev/null +++ b/abs/extra-testing/community/squeezeboxserver/squeezeboxserver.rc @@ -0,0 +1,47 @@ +#!/bin/bash + +# source application-specific settings +[ -f /etc/conf.d/squeezeboxserver ] && . /etc/conf.d/squeezeboxserver + +# general config +. /etc/rc.conf +. /etc/rc.d/functions + +squeezehome=/home/squeezeboxserver +pidfile=/var/run/squeezeboxserver.pid +logfile=/var/log/squeezeboxserver.log +prefsdir=/home/squeezeboxserver/prefs +cachedir=/var/cache/squeezeboxserver + + +case "$1" in + start) + stat_busy "Starting SqueezeBoxServer" + cd $squeezehome + ./slimserver.pl --daemon --user squeezeboxserver --prefsdir $prefsdir \ + --cachedir $cachedir --pidfile $pidfile --logfile $logfile $SQUEEZEBOXSERVER_OPTS + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon squeezeboxserver + stat_done + fi + ;; + stop) + stat_busy "Stopping SqueezeBoxServer" + kill `cat $pidfile` &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon squeezeboxserver + stat_done + fi + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac |