Browse Source

[icecast] add minimalistic init script

Signed-off-by: André Gaul <gaul@web-yard.de>
André Gaul 10 years ago
parent
commit
edd031bca3
2 changed files with 16 additions and 0 deletions
  1. 2
    0
      multimedia/icecast/Makefile
  2. 14
    0
      multimedia/icecast/files/icecast.init

+ 2
- 0
multimedia/icecast/Makefile View File

@@ -77,6 +77,8 @@ endef
77 77
 define Package/icecast/install
78 78
 	$(INSTALL_DIR) $(1)/etc
79 79
 	$(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
80
+	$(INSTALL_DIR) $(1)/etc/init.d
81
+	$(INSTALL_BIN) ./files/icecast.init $(1)/etc/init.d/icecast
80 82
 	$(INSTALL_DIR) $(1)/usr/bin
81 83
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/
82 84
 	$(INSTALL_DIR) $(1)/usr/share/icecast

+ 14
- 0
multimedia/icecast/files/icecast.init View File

@@ -0,0 +1,14 @@
1
+#!/bin/sh /etc/rc.common
2
+# Example script
3
+# Copyright (C) 2014 OpenWrt.org
4
+ 
5
+START=99
6
+STOP=15
7
+
8
+start() {        
9
+        service_start /usr/bin/icecast -c /etc/icecast.xml -b
10
+}                 
11
+ 
12
+stop() {          
13
+	service_stop /usr/bin/icecast
14
+}