summaryrefslogtreecommitdiff
path: root/media-sound/ezstream/files
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/ezstream/files
reinit the tree, so we can have metadata
Diffstat (limited to 'media-sound/ezstream/files')
-rw-r--r--media-sound/ezstream/files/ezstream.confd5
-rw-r--r--media-sound/ezstream/files/ezstream.initd33
2 files changed, 38 insertions, 0 deletions
diff --git a/media-sound/ezstream/files/ezstream.confd b/media-sound/ezstream/files/ezstream.confd
new file mode 100644
index 000000000000..6480e0c7a71f
--- /dev/null
+++ b/media-sound/ezstream/files/ezstream.confd
@@ -0,0 +1,5 @@
+# Config location
+CONFIGFILE=""
+
+# Options
+EZSTREAM_OPTS=""
diff --git a/media-sound/ezstream/files/ezstream.initd b/media-sound/ezstream/files/ezstream.initd
new file mode 100644
index 000000000000..f83e96473e35
--- /dev/null
+++ b/media-sound/ezstream/files/ezstream.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+
+depend() {
+ need icecast
+}
+
+checkconfig() {
+ if [ ! -e ${CONFIGFILE} ]; then
+ eerror "You need to make a config file"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ezstream"
+ start-stop-daemon --background --start --pidfile /var/run/ezstream.pid \
+ --make-pidfile --user icecast --group nogroup \
+ --exec /usr/bin/ezstream -- ${EZSTREAM_OPTS} -c "${CONFIGFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ezstream"
+ start-stop-daemon --stop --pidfile /var/run/ezstream.pid --name ezstream
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ezstream"
+ kill -1 `cat /var/run/ezstream.pid`
+ eend $?
+}