summaryrefslogtreecommitdiff
path: root/media-sound/peercast/files/peercast.initd
blob: 9739b4a31381c515aeee7520dab1c7e884baf52e (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
#!/sbin/openrc-run
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

pidfile=/var/run/peercast.pid

depend() {
	need net
}

start() {
	ebegin "Starting peercast daemon"
	start-stop-daemon --start --quiet --background \
		--make-pidfile --pidfile ${pidfile} \
		--chuid nobody:audio \
		--exec /usr/sbin/peercast -- \
		-i /usr/share/peercast/peercast.ini \
		-l /var/log/peercast.log \
		-P /usr/share/peercast
	eend $?
}

stop() {
	ebegin "Stopping peercast daemon"
	start-stop-daemon --stop --quiet --pidfile ${pidfile}
	eend $?
}