1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix glorytun settings apply

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-12-16 10:05:25 +01:00
parent aa5b3438e7
commit a0b5b2a1a0
3 changed files with 12 additions and 12 deletions

View file

@ -20,14 +20,13 @@ _err() {
validate_section() {
uci_validate_section glorytun-udp glorytun-udp "${1}" \
'enable:bool:0' \
'mode:string' \
'key:string' \
'host:host' \
'port:port' \
'proto:string' \
'mtuauto:bool:0' \
'chacha:bool:0' \
'enable:bool:0' \
'mode:string' \
'key:string' \
'host:host' \
'port:port' \
'mtuauto:bool:0' \
'chacha:bool:0' \
'dev:string'
}

View file

@ -25,8 +25,9 @@ set_default() {
config_get keepalive "$config" keepalive "25s"
[ "$remoteip" != "" ] && [ "$localip" != "" ] && ifconfig $DEVICE $localip pointopoint $remoteip up
while [ -z "$(glorytun-udp list | grep $iface)" ]; do
glorytun-udp set dev $iface kxtimeout $kxtimeout timetolerance $timetolerance keepalive $keepalive
sleep 1
done
glorytun-udp set dev $iface kxtimeout $kxtimeout timetolerance $timetolerance keepalive $keepalive
}
}

View file

@ -592,9 +592,9 @@ if [ "$multipath_config" = "on" ] || [ "$multipath_config" = "backup" ]; then
fi
fi
fi
if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp set | grep 'kxtimeout 7d')" = "" ]; then
glorytun-udp set dev tun0 kxtimeout 7d > /dev/null 2>&1
fi
# if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp set | grep 'kxtimeout 7d')" = "" ]; then
# glorytun-udp set dev tun0 kxtimeout 7d > /dev/null 2>&1
# fi
[ "$multipath_config" = "backup" ] && [ "$(pgrep glorytun-udp)" != "" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set pref 500 > /dev/null 2>&1
fi
[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" != "1" ] && {