From 1c822ed6521472b0c7c292c5ee04213d6cd3f62d Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 23 Jan 2022 13:45:18 -0600 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index f87db5d..98230bb 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -16,7 +16,7 @@ unset IFS OUT=`ip a show $VPN_INTERFACE up`; MMSTART(){ - + /usr/sbin/service openvpn start checked=false cc=0 until [ "${checked}" = "" ]; do @@ -71,7 +71,6 @@ MMSTOP(){ if [[ ${1} = "start" ]]; then touch /opt/mm.stop - /usr/sbin/service openvpn start MMSTART elif [[ ${1} = "stop" ]]; then @@ -93,20 +92,12 @@ fi if [ ${action-x} ]; then case $action in - start) + start | check) touch /opt/mm.stop MMSTART;; stop) touch /opt/mm.stop MMSTOP;; - check) - if [ ! -f /opt/mm.stop ]; then - for srvc in "${SERVICES_CHECK[@]}"; do - if [ "$(systemctl is-active ${srvc})" = "inactive" ]; then - /usr/sbin/service ${srvc} start - fi - done - fi *) echo -e "Usage: ${idsCL[LightCyan]}mm${idsCL[Default]} {"