diff --git a/mm-scripts.sh b/mm-scripts.sh index be22297..9f9edb0 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -37,6 +37,13 @@ MMSTART(){ #OUT=`ip a show $VPN_INTERFACE up` >/dev/null 2>&1 if [ ${#OUT} -ne 0 ]; then checked="" + elif [ "${1}" = "check" ] && [ ${cc} -eq 0 ]; then + touch /opt/mm.vpn.fail + MMSTOP + sleep 1m + "${VPN_START[@]}" + rm -f /opt/mm.stop + exit 1 fi if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; then if [ -f /opt/mm.vpn.fail ]; then