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

Restart DSVPN if down

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-09-08 19:13:04 +02:00
parent 2cefc93ad7
commit 83b4a27504
2 changed files with 6 additions and 1 deletions

View file

@ -588,6 +588,11 @@ if [ "$(pgrep mlvpn)" = "" ] && [ "$(uci -q get mlvpn.general.enable)" = "1" ] &
/etc/init.d/mlvpn restart /etc/init.d/mlvpn restart
sleep 5 sleep 5
fi fi
if [ "$(pgrep dsvpn)" = "" ] && [ "$(uci -q get dsvpn.vpn.enable)" = "1" ] && [ -f /etc/init.d/dsvpn ]; then
_log "Can't find DSVPN, restart it..."
/etc/init.d/dsvpn restart
sleep 5
fi
set_get_config() { set_get_config() {
local server=$1 local server=$1

View file

@ -45,7 +45,7 @@ if [ "$(uci -q get dsvpn.vpn)" = "" ]; then
set dsvpn.vpn.port=65011 set dsvpn.vpn.port=65011
set dsvpn.vpn.localip=10.255.251.2 set dsvpn.vpn.localip=10.255.251.2
set dsvpn.vpn.remoteip=10.255.251.1 set dsvpn.vpn.remoteip=10.255.251.1
set dsvpn.vpn.enabled=0 set dsvpn.vpn.enable=0
commit dsvpn commit dsvpn
EOF EOF
fi fi