summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Gaul <gaul@web-yard.de>2014-07-25 17:17:29 +0200
committerAndré Gaul <gaul@web-yard.de>2014-07-25 19:25:57 +0200
commitedd031bca3d471cc1eb527fba90b517afa374459 (patch)
tree6bb1f2674b4a6713e636b432e68bbece1a0c7d85
parent369d05aeb13e72b9cac050364e323cdf4e47e0b7 (diff)
[icecast] add minimalistic init script
Signed-off-by: André Gaul <gaul@web-yard.de>
-rw-r--r--multimedia/icecast/Makefile2
-rwxr-xr-xmultimedia/icecast/files/icecast.init14
2 files changed, 16 insertions, 0 deletions
diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile
index 0dfab0238..f70311298 100644
--- a/multimedia/icecast/Makefile
+++ b/multimedia/icecast/Makefile
@@ -77,6 +77,8 @@ endef
define Package/icecast/install
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/icecast.init $(1)/etc/init.d/icecast
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/share/icecast
diff --git a/multimedia/icecast/files/icecast.init b/multimedia/icecast/files/icecast.init
new file mode 100755
index 000000000..11f9f5299
--- /dev/null
+++ b/multimedia/icecast/files/icecast.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+# Example script
+# Copyright (C) 2014 OpenWrt.org
+
+START=99
+STOP=15
+
+start() {
+ service_start /usr/bin/icecast -c /etc/icecast.xml -b
+}
+
+stop() {
+ service_stop /usr/bin/icecast
+}