summaryrefslogtreecommitdiff
path: root/media-sound/peercast/files/peercast.initd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-sound/peercast/files/peercast.initd
reinit the tree, so we can have metadata
Diffstat (limited to 'media-sound/peercast/files/peercast.initd')
-rw-r--r--media-sound/peercast/files/peercast.initd27
1 files changed, 27 insertions, 0 deletions
diff --git a/media-sound/peercast/files/peercast.initd b/media-sound/peercast/files/peercast.initd
new file mode 100644
index 000000000000..9739b4a31381
--- /dev/null
+++ b/media-sound/peercast/files/peercast.initd
@@ -0,0 +1,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 $?
+}