diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-04-16 13:13:30 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-04-16 13:13:30 +0000 |
commit | 29b87cde37f78308cd5f8651a29951d8a700fb37 (patch) | |
tree | e2e707b269473e2e502ab6fcde73535cfe93be9a /audio/slimserver/files | |
parent | 2985d53d3a8f7b1b56b04275db0a268f93e4a542 (diff) | |
download | ports-29b87cde37f78308cd5f8651a29951d8a700fb37.tar.gz ports-29b87cde37f78308cd5f8651a29951d8a700fb37.zip |
Notes
Diffstat (limited to 'audio/slimserver/files')
-rw-r--r-- | audio/slimserver/files/patch-Slim_Music_Info.pm | 14 | ||||
-rw-r--r-- | audio/slimserver/files/patch-Slim_Utils_Prefs.pm | 14 | ||||
-rw-r--r-- | audio/slimserver/files/slimserver.sh | 56 | ||||
-rw-r--r-- | audio/slimserver/files/slimserver.sh.in | 56 |
4 files changed, 140 insertions, 0 deletions
diff --git a/audio/slimserver/files/patch-Slim_Music_Info.pm b/audio/slimserver/files/patch-Slim_Music_Info.pm new file mode 100644 index 000000000000..2cfb264d2873 --- /dev/null +++ b/audio/slimserver/files/patch-Slim_Music_Info.pm @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- Slim/Music/Info.pm.orig Thu Apr 15 20:57:32 2004 ++++ Slim/Music/Info.pm Thu Apr 15 20:57:49 2004 +@@ -208,7 +208,7 @@ + + # TODO: MacOS X should really store this in a visible, findable place. + if (Slim::Utils::OSDetect::OS() eq 'unix') { +- $dbname = '.slimserver.db'; ++ $dbname = 'slimserver.db'; + } else { + $dbname ='slimserver.db'; + } diff --git a/audio/slimserver/files/patch-Slim_Utils_Prefs.pm b/audio/slimserver/files/patch-Slim_Utils_Prefs.pm new file mode 100644 index 000000000000..c475b4593af3 --- /dev/null +++ b/audio/slimserver/files/patch-Slim_Utils_Prefs.pm @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- Slim/Utils/Prefs.pm.orig Thu Apr 15 18:09:50 2004 ++++ Slim/Utils/Prefs.pm Thu Apr 15 18:10:44 2004 +@@ -564,7 +564,7 @@ + } elsif (Slim::Utils::OSDetect::OS() eq 'win') { + $prefsPath = $Bin; + } else { +- $prefsPath = $ENV{'HOME'}; ++ $prefsPath = "/var/db/slimserver"; + } + + $::d_prefs && msg("The default prefs directory is $prefsPath\n"); diff --git a/audio/slimserver/files/slimserver.sh b/audio/slimserver/files/slimserver.sh new file mode 100644 index 000000000000..bea293be52f4 --- /dev/null +++ b/audio/slimserver/files/slimserver.sh @@ -0,0 +1,56 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: slimserver +# REQUIRE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable slimserver: +# +#slimserver_enable="YES" +# + +. %%RC_SUBR%% + +name=slimserver +stop_cmd="slimserver_stop" +rcvar=`set_rcvar` + +command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl +pidfile=/var/run/${name}.pid +conffile=/var/db/slimserver/slimserver.conf +logfile=/var/log/slimserver.log +u=slimserv +g=slimserv +command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}" + +slimserver_stop() +{ + if [ ! -f ${pidfile} ]; then + exit + fi + echo 'Stopping SlimServer.' + rc_pid=`cat ${pidfile}` + rc_pid=`pgrep -u ${u} | grep ${rc_pid}` + if [ -n "${rc_pid}" ]; then + rc_pids="${rc_pid} `pgrep -u ${u} mDNSResponderPosix`" + + kill $sig_stop $rc_pids + wait_for_pids $rc_pids + else + echo "${name} not running? (check ${pidfile})" + fi + + rm -f ${pidfile} +} + +# set defaults + +slimserver_enable=${slimserver_enable:-"NO"} +slimserver_flags=${slimserver_flags:-""} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/audio/slimserver/files/slimserver.sh.in b/audio/slimserver/files/slimserver.sh.in new file mode 100644 index 000000000000..bea293be52f4 --- /dev/null +++ b/audio/slimserver/files/slimserver.sh.in @@ -0,0 +1,56 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: slimserver +# REQUIRE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable slimserver: +# +#slimserver_enable="YES" +# + +. %%RC_SUBR%% + +name=slimserver +stop_cmd="slimserver_stop" +rcvar=`set_rcvar` + +command=%%PREFIX%%/%%SLIMDIR%%/slimserver.pl +pidfile=/var/run/${name}.pid +conffile=/var/db/slimserver/slimserver.conf +logfile=/var/log/slimserver.log +u=slimserv +g=slimserv +command_args="--daemon --prefsfile=${conffile} --logfile=${logfile} --user=${u} --group=${g} --pidfile=${pidfile}" + +slimserver_stop() +{ + if [ ! -f ${pidfile} ]; then + exit + fi + echo 'Stopping SlimServer.' + rc_pid=`cat ${pidfile}` + rc_pid=`pgrep -u ${u} | grep ${rc_pid}` + if [ -n "${rc_pid}" ]; then + rc_pids="${rc_pid} `pgrep -u ${u} mDNSResponderPosix`" + + kill $sig_stop $rc_pids + wait_for_pids $rc_pids + else + echo "${name} not running? (check ${pidfile})" + fi + + rm -f ${pidfile} +} + +# set defaults + +slimserver_enable=${slimserver_enable:-"NO"} +slimserver_flags=${slimserver_flags:-""} + +load_rc_config ${name} +run_rc_command "$1" |