diff --git a/owsd/Makefile b/owsd/Makefile index d8cce9c67..d02ab7e0f 100644 --- a/owsd/Makefile +++ b/owsd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=owsd PKG_VERSION:=0.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO=git PKG_SOURCE_URL:=git@public.inteno.se:owsd.git diff --git a/owsd/files/owsd b/owsd/files/owsd index 873e1561d..3e1383a60 100644 --- a/owsd/files/owsd +++ b/owsd/files/owsd @@ -1,7 +1,9 @@ config owsd 'setup' - option sock '/var/run/ubus.sock' - option port '8843' + #option sock '/var/run/ubus.sock' + #option port '8843' list origin 'http://localhost/' list origin 'http://localhost:80/' list origin 'http://localhost:8080/' + #option cert '/usr/share/owsd/cert.pem' + #option key '/usr/share/owsd/ke.pem' diff --git a/owsd/files/owsd.init b/owsd/files/owsd.init index 6fdcd2c0c..a6e5cd7a6 100644 --- a/owsd/files/owsd.init +++ b/owsd/files/owsd.init @@ -10,8 +10,10 @@ CONFIGFILE="/etc/config/owsd" validate_owsd() { uci_validate_section owsd config setup \ 'sock:string' \ - 'port:string' \ - 'origin:string' + 'port:integer' \ + 'origin:string' \ + 'cert:string' \ + 'key:string' } start_service() { @@ -23,12 +25,15 @@ start_service() { return 1 } - [ -n "${port}" ] || return 0 + [ -n "${sock}" ] && procd_append_param command -s "${sock}" + [ -n "${port}" ] && procd_append_param command -p "${port}" + [ -n "${origin}" ] && origin=${origin//\ / \-o\ } && procd_append_param command -o ${origin} + [ -n "${cert}" ] && procd_append_param command -C "${cert}" + [ -n "${key}" ] && procd_append_param command -K "${key}" - origin=${origin//\ / \-o\ } - - procd_append_param command -s ${sock} -p ${port} -o ${origin} +# procd_set_param stderr 1 procd_set_param respawn + procd_close_instance }