diff --git a/mm-scripts.sh b/mm-scripts.sh index aa9b6f1..cbe3114 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -34,6 +34,13 @@ unset IFS MMSTART(){ [ $VERBOSE = true ] && chktmstart=`date +%s` if [ "${1}" = "start" ] || [ "${1}" = "" ]; then + GOFORSTART=true; + elif [ "${1}" = "check" ] && [ "$(systemctl is-active openvpn)" != "active" ]; then + GOFORSTART=true; + else + GOFORSTART=false; + fi + if [ ${GOFORSTART} = true ]; then mmsv='Starting' echo OUT=$(ip link | grep "$VPN_INTERFACE")