diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-sound/ezstream/files/ezstream.initd |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-sound/ezstream/files/ezstream.initd')
-rw-r--r-- | media-sound/ezstream/files/ezstream.initd | 33 |
1 files changed, 33 insertions, 0 deletions
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 $? +} |