blob: 7082830bcb86ac433e785f3bcba9080f540d8887 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezecenter/files/squeezecenter.init.d,v 1.3 2008/12/20 01:24:43 lavajoe Exp $
# These fit the SqueezeCenter ebuild and so shouldn't need to be changed;
# user-servicable parts go in /etc/conf.d/squeezecenter.
pidfile=/var/run/squeezecenter/squeezecenter.pid
logdir=/var/log/squeezecenter
varlibdir=/var/lib/squeezecenter
prefsdir=${varlibdir}/prefs
cachedir=${varlibdir}/cache
prefsfile=${prefsdir}/squeezecenter.prefs
scuser=squeezecenter
scname=squeezecenter-server
depend() {
need net mysql
}
start() {
ebegin "Starting SqueezeCenter"
export SSD_NICELEVEL=${SC_NICENESS}
cd /
start-stop-daemon \
--start --exec /usr/bin/perl /usr/sbin/${scname} \
--pidfile ${pidfile} \
--startas /usr/sbin/${scname} \
--chuid ${scuser} \
-- \
--quiet --daemon \
--pidfile=${pidfile} \
--cachedir=${cachedir} \
--prefsfile=${prefsfile} \
--prefsdir=${prefsdir} \
--logdir=${logdir} \
--audiodir=${SC_MUSIC_DIR} \
--playlistdir=${SC_PLAYLISTS_DIR} \
${SC_OPTS}
eend $? "Failed to start SqueezeCenter"
}
stop() {
ebegin "Stopping SqueezeCenter"
start-stop-daemon -o --stop --pidfile ${pidfile}
eend $? "Failed to stop SqueezeCenter"
}
|