1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Change defaults for haproxy-tcp

This commit is contained in:
Ycarus 2018-02-28 15:07:40 +01:00
parent 896372b391
commit 6e313a25b8
3 changed files with 10 additions and 10 deletions

View file

@ -50,8 +50,8 @@ o.datatype = "range(1, 10)"
o.rmempty = false o.rmempty = false
o = s:option(DynamicList, "upstreams", translate("UpStream Server"), translate("e.g. [123.123.123.123:65101 check]")) o = s:option(DynamicList, "upstreams", translate("UpStream Server"), translate("e.g. [123.123.123.123:65101 weight 1 check]"))
o.placeholder = "123.123.123.123:65101" o.placeholder = "123.123.123.123:65101 weight 1 check"
o.rmempty = false o.rmempty = false
return m return m

View file

@ -21,8 +21,8 @@ _err() {
validate_section() { validate_section() {
uci_validate_section haproxy-tcp general "${1}" \ uci_validate_section haproxy-tcp general "${1}" \
'enable:bool:0' \ 'enable:bool:0' \
'retries:uinteger:1' \ 'retries:uinteger:3' \
'timeout:uinteger:1000' \ 'timeout:uinteger:4000' \
'startup_delay:uinteger:5' \ 'startup_delay:uinteger:5' \
'admin_stats:port:7777' \ 'admin_stats:port:7777' \
'listen:string' \ 'listen:string' \
@ -61,13 +61,13 @@ start_instance() {
defaults defaults
mode tcp mode tcp
retries ${retries:-2} retries ${retries}
timeout connect ${timeout:-1000} timeout connect ${timeout}
timeout client ${timeout:-1000} timeout client ${timeout}
timeout server ${timeout:-1000} timeout server ${timeout}
listen admin_stats listen admin_stats
bind 0.0.0.0:${admin_stats:-7777} bind 0.0.0.0:${admin_stats}
mode http mode http
stats uri / stats uri /
stats refresh 10s stats refresh 10s
@ -109,7 +109,6 @@ start_service() {
stop_service() { stop_service() {
killall $PROG_NAME killall $PROG_NAME
service_stop $PROG_NAME
rm -rf /var/etc/$PROG_NAME.cfg rm -rf /var/etc/$PROG_NAME.cfg
} }

View file

@ -12,4 +12,5 @@ EOF
/etc/init.d/haproxy-tcp enable /etc/init.d/haproxy-tcp enable
rm -f /tmp/luci-indexcache
exit 0 exit 0