瀏覽代碼

shairplay: add respawn config.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Álvaro Fernández Rojas 10 年之前
父節點
當前提交
c57a60513b

+ 1
- 1
multimedia/shairplay/Makefile 查看文件

@@ -8,7 +8,7 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=shairplay
11
-PKG_VERSION:=2014-10-25
11
+PKG_VERSION:=2014-10-27
12 12
 PKG_RELEASE:=$(PKG_SOURCE_VERSION)
13 13
 
14 14
 PKG_SOURCE_PROTO:=git

+ 1
- 0
multimedia/shairplay/files/shairplay.config 查看文件

@@ -1,5 +1,6 @@
1 1
 config shairplay main
2 2
 	option disabled '1'
3
+	option respawn '1'
3 4
 	option apname 'AirPlay'
4 5
 	option port '5000'
5 6
 	option password ''

+ 6
- 2
multimedia/shairplay/files/shairplay.init 查看文件

@@ -17,9 +17,10 @@ append_arg() {
17 17
 
18 18
 start_instance() {
19 19
 	local cfg="$1"
20
+	local aux
20 21
 
21
-	config_get_bool disabled "$cfg" 'disabled' '0'
22
-	[ "$disabled" = 1 ] && return 1
22
+	config_get_bool aux "$cfg" 'disabled' '0'
23
+	[ "$aux" = 1 ] && return 1
23 24
 
24 25
 	procd_open_instance
25 26
 
@@ -34,6 +35,9 @@ start_instance() {
34 35
 	append_arg "$cfg" ao_devicename "--ao_devicename"
35 36
 	append_arg "$cfg" ao_deviceid "--ao_deviceid"
36 37
 
38
+	config_get_bool aux "$cfg" 'respawn' '0'
39
+	[ "$aux" = 1 ] && procd_set_param respawn
40
+
37 41
 	procd_close_instance
38 42
 }
39 43