1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-03-09 15:50:00 +00:00
This commit is contained in:
Ycarus (Yannick Chabanois) 2019-03-18 10:31:47 +00:00
parent 1e1270de67
commit 54b5379621
2 changed files with 7 additions and 6 deletions

View file

@ -37,7 +37,8 @@ _ping() {
-W 5 \
-c 1 \
-q
) && echo "$ret" | grep -sq "0% packet loss" && {
)
[ -n "$ret" ] && echo "$ret" | grep -sq "0% packet loss" && {
return
}
false
@ -104,7 +105,7 @@ $allip_mlvpn"
}
fi
fi
result="$(curl -Isk https://127.0.0.1:65500/status | head -n 1 | grep 401)"
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