mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Remove startup delay and rename config of Nginx-ha
This commit is contained in:
parent
5f882b75ae
commit
b82d337a68
3 changed files with 7 additions and 25 deletions
|
@ -20,11 +20,10 @@ _err() {
|
|||
}
|
||||
|
||||
validate_section() {
|
||||
uci_validate_section nginx-ha general "${1}" \
|
||||
uci_validate_section nginx-ha nginxha "${1}" \
|
||||
'enable:bool:0' \
|
||||
'retries:uinteger:3' \
|
||||
'timeout:uinteger:4000' \
|
||||
'startup_delay:uinteger:5' \
|
||||
'listen:string' \
|
||||
'upstreams:list(string)'
|
||||
}
|
||||
|
@ -33,12 +32,6 @@ genline_srv(){
|
|||
echo " server $1;"
|
||||
}
|
||||
|
||||
boot() {
|
||||
local delay=$(uci -q get $NAME.general.startup_delay)
|
||||
(sleep ${delay:-0} && start >/dev/null 2>&1) &
|
||||
return 0
|
||||
}
|
||||
|
||||
start_instance() {
|
||||
local enable retries timeout startup_delay listen upstreams
|
||||
|
||||
|
@ -69,7 +62,7 @@ start_instance() {
|
|||
start_service() {
|
||||
local stream=""
|
||||
config_load nginx-ha
|
||||
config_foreach start_instance general
|
||||
config_foreach start_instance nginxha
|
||||
|
||||
[ -z "$stream" ] && return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue