mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-01-28 01:47:19 +01:00
owsd: update default config and init script
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
This commit is contained in:
parent
5bdb01b7cc
commit
8bb705d288
3 changed files with 16 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue