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

Latest changes in scripts and configuration

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-11-16 21:49:07 +01:00
parent a3010bebcb
commit 10ae7a15c8
4 changed files with 77 additions and 37 deletions

View file

@ -108,21 +108,22 @@ $allip_mlvpn"
fi
fi
done < <(printf '%s\n' "$allip")
[ -z "$iface" ] && {
[ -z "$iface" ] && [ -f /etc/openmptcprouter-vps-admin/current-vpn ] && {
logger -t "OMR-Service" "Restart Glorytun and networkd"
systemctl -q restart glorytun-tcp@tun0
systemctl -q restart glorytun-udp@tun0
current_vpn="$(cat /etc/openmptcprouter-vps-admin/current-vpn)"
[ "$current_vpn" = "glorytun_tcp" ] && systemctl -q restart glorytun-tcp@tun0
[ "$current_vpn" = "glorytun_udp" ] && systemctl -q restart glorytun-udp@tun0
systemctl -q restart systemd-networkd
_multipath
sleep 10
}
fi
fi
result="$(curl -Isk -m 30 https://127.0.0.1:65500/status | head -n 1 | grep 401)"
if [ "$result" = "" ]; then
logger -t "OMR-Service" "Restart OMR Admin"
systemctl -q restart omr-admin
sleep 10
fi
#result="$(curl -Isk -m 30 https://127.0.0.1:65500/status | head -n 1 | grep 405)"
#if [ "$result" = "" ]; then
# logger -t "OMR-Service" "Restart OMR Admin"
# systemctl -q restart omr-admin
# sleep 10
#fi
sleep 10
done