shairplay: add respawn config.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2014-10-27 20:57:08 +01:00
parent 1ffcf17b02
commit c57a60513b
3 changed files with 8 additions and 3 deletions

View file

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

View file

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

View file

@ -17,9 +17,10 @@ append_arg() {
start_instance() { start_instance() {
local cfg="$1" local cfg="$1"
local aux
config_get_bool disabled "$cfg" 'disabled' '0' config_get_bool aux "$cfg" 'disabled' '0'
[ "$disabled" = 1 ] && return 1 [ "$aux" = 1 ] && return 1
procd_open_instance procd_open_instance
@ -34,6 +35,9 @@ start_instance() {
append_arg "$cfg" ao_devicename "--ao_devicename" append_arg "$cfg" ao_devicename "--ao_devicename"
append_arg "$cfg" ao_deviceid "--ao_deviceid" append_arg "$cfg" ao_deviceid "--ao_deviceid"
config_get_bool aux "$cfg" 'respawn' '0'
[ "$aux" = 1 ] && procd_set_param respawn
procd_close_instance procd_close_instance
} }