1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 10:31: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 = s:option(DynamicList, "upstreams", translate("UpStream Server"), translate("e.g. [123.123.123.123:65101 check]"))
o.placeholder = "123.123.123.123:65101"
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 weight 1 check"
o.rmempty = false
return m

View file

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

View file

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