Browse Source

Merge pull request #1974 from thess/icecast-update

icecast: Improve OOB experience - new defaults, add user & group ids
Ted Hess 9 years ago
parent
commit
ba8206bb0d

+ 2
- 1
multimedia/icecast/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=icecast
11 11
 PKG_VERSION:=2.4.2
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 PKG_LICENSE:=GPL-2.0
14 14
 PKG_MAINTAINER:=André Gaul <andre@gaul.io>
15 15
 
@@ -29,6 +29,7 @@ define Package/icecast
29 29
   CATEGORY:=Multimedia
30 30
   DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libopenssl
31 31
   TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams
32
+  USERID:=icecast=87:icecast=87
32 33
   URL:=http://www.icecast.org/
33 34
 endef
34 35
 

+ 12
- 3
multimedia/icecast/files/icecast.init View File

@@ -1,12 +1,21 @@
1 1
 #!/bin/sh /etc/rc.common
2
-# Example script
3
-# Copyright (C) 2014 OpenWrt.org
2
+
3
+# Startup script
4
+# Copyright (C) 2015 OpenWrt.org
4 5
  
5 6
 USE_PROCD=1
6
-START=99
7
+START=90
7 8
 STOP=15
8 9
 
9 10
 start_service() {
11
+	user_exists icecast 87 || user_add icecast 87
12
+	group_exists icecast 87 || group_add icecast 87
13
+	
14
+	[ -d /var/log/icecast ] || {
15
+		mkdir -m 0755 -p /var/log/icecast
16
+		chown icecast:icecast /var/log/icecast
17
+	}
18
+
10 19
 	procd_open_instance
11 20
 	procd_set_param command /usr/bin/icecast -c /etc/icecast.xml
12 21
 	procd_set_param respawn

+ 25
- 0
multimedia/icecast/patches/020-icecast_config_for_openwrt.patch View File

@@ -0,0 +1,25 @@
1
+--- a/conf/icecast.xml.in
2
++++ b/conf/icecast.xml.in
3
+@@ -61,7 +61,7 @@
4
+          It affects mainly the urls generated by Icecast for playlists and yp
5
+          listings. You MUST configure it properly for YP listings to work!
6
+     -->
7
+-    <hostname>localhost</hostname>
8
++    <hostname>OpenWrt</hostname>
9
+ 
10
+     <!-- You may have multiple <listener> elements -->
11
+     <listen-socket>
12
+@@ -234,11 +234,9 @@
13
+ 
14
+     <security>
15
+         <chroot>0</chroot>
16
+-        <!--
17
+         <changeowner>
18
+-            <user>nobody</user>
19
+-            <group>nogroup</group>
20
++            <user>icecast</user>
21
++            <group>icecast</group>
22
+         </changeowner>
23
+-        -->
24
+     </security>
25
+ </icecast>