diff options
Diffstat (limited to 'audio/squeezeboxserver/files/squeezecenter.sh.in')
-rw-r--r-- | audio/squeezeboxserver/files/squeezecenter.sh.in | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/audio/squeezeboxserver/files/squeezecenter.sh.in b/audio/squeezeboxserver/files/squeezecenter.sh.in deleted file mode 100644 index b91aa35cc23f..000000000000 --- a/audio/squeezeboxserver/files/squeezecenter.sh.in +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: slimserver -# REQUIRE: LOGIN -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable slimserver: -# -#slimserver_enable="YES" -# - -. %%RC_SUBR%% - -name=slimserver -start_precmd="slimserver_start_precmd" -stop_postcmd="slimserver_poststop" -rcvar=`set_rcvar` - -command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl -command_interpreter=%%PERL%% -pidfile=/var/run/${name}.pid -logfile=/var/log/slimserver.log -statedir=%%SLIMDBDIR%% -cachedir=${statedir}/cache -playlistdir=${statedir}/playlists -conffile=${statedir}/slimserver.conf -u=slimserv -g=slimserv -command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}" - -slimserver_start_precmd() -{ - if [ ! -d ${statedir} ]; then - mkdir -p ${statedir} - chown -R ${u}:${g} ${statedir} - fi - if [ ! -d ${cachedir} ]; then - mkdir -p ${cachedir} - chown -R ${u}:${g} ${cachedir} - fi - if [ ! -d ${playlistdir} ]; then - mkdir -p ${playlistdir} - chown -R ${u}:${g} ${playlistdir} - fi - if [ ! -f ${conffile} ]; then - touch ${conffile} - chown ${u}:${g} ${conffile} - fi - if [ ! -f ${logfile} ]; then - touch ${logfile} - chown ${u}:${g} ${logfile} - fi -} - -slimserver_poststop() -{ - # Slimserver kills mDNSResponderPosix, but then manages to start - # another one while dying so kill it off. - echo "Stopping SlimServer's mDNSResponderPosix." - mdns_pid=$(check_pidfile ${cachedir}/mDNS.pid %%LOCALBASE%%/bin/mDNSResponderPosix) - if [ -n "${mdns_pid}" ]; then - # mDNSResponderPosix doens't die without a kill - kill -9 $mdns_pid - wait_for_pids $mdns_pid - rm -f ${cachedir}/mDNS.pid - fi -} - -load_rc_config ${name} - -slimserver_enable=${slimserver_enable:-"NO"} -slimserver_flags=${slimserver_flags:-""} - -run_rc_command "$1" |