Update mm-scripts.sh
This commit is contained in:
@@ -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]} {"
|
||||
|
||||
Reference in New Issue
Block a user