shairplay: add respawn config.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
1ffcf17b02
commit
c57a60513b
|
@ -8,7 +8,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=shairplay
|
||||
PKG_VERSION:=2014-10-25
|
||||
PKG_VERSION:=2014-10-27
|
||||
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
config shairplay main
|
||||
option disabled '1'
|
||||
option respawn '1'
|
||||
option apname 'AirPlay'
|
||||
option port '5000'
|
||||
option password ''
|
||||
|
|
|
@ -17,9 +17,10 @@ append_arg() {
|
|||
|
||||
start_instance() {
|
||||
local cfg="$1"
|
||||
local aux
|
||||
|
||||
config_get_bool disabled "$cfg" 'disabled' '0'
|
||||
[ "$disabled" = 1 ] && return 1
|
||||
config_get_bool aux "$cfg" 'disabled' '0'
|
||||
[ "$aux" = 1 ] && return 1
|
||||
|
||||
procd_open_instance
|
||||
|
||||
|
@ -34,6 +35,9 @@ start_instance() {
|
|||
append_arg "$cfg" ao_devicename "--ao_devicename"
|
||||
append_arg "$cfg" ao_deviceid "--ao_deviceid"
|
||||
|
||||
config_get_bool aux "$cfg" 'respawn' '0'
|
||||
[ "$aux" = 1 ] && procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue