Update mm-scripts.sh
This commit is contained in:
@@ -376,7 +376,7 @@ MMSTOP(){
|
|||||||
msg="Stopping Services"
|
msg="Stopping Services"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc}: ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
|
|
||||||
for srvc in "${!MM_SERVICES[@]}"; do
|
for srvc in "${!MM_SERVICES[@]}"; do
|
||||||
if [[ ${srvc} != *"vpn"* ]] && [[ ${srvc} != *"wireguard"* ]]; then
|
if [[ ${srvc} != *"vpn"* ]] && [[ ${srvc} != *"wireguard"* ]]; then
|
||||||
@@ -415,7 +415,7 @@ MMSTOP(){
|
|||||||
msg="Shutting Down VPN Tunnel"
|
msg="Shutting Down VPN Tunnel"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc}: ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
|
|
||||||
"${VPN_STOP[@]}" >/dev/null 2>&1
|
"${VPN_STOP[@]}" >/dev/null 2>&1
|
||||||
|
|
||||||
@@ -433,7 +433,7 @@ MMSTOP(){
|
|||||||
msg="Re-Adding Default Network Routes"
|
msg="Re-Adding Default Network Routes"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc}: ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
|
|
||||||
[ "$(/sbin/ip route show | grep default | cut -d' ' -f 3)" != "10.10.0.1" ] && /bin/ip route add default via 10.10.0.1 && ip route del ${vpn_server_address}
|
[ "$(/sbin/ip route show | grep default | cut -d' ' -f 3)" != "10.10.0.1" ] && /bin/ip route add default via 10.10.0.1 && ip route del ${vpn_server_address}
|
||||||
[ $VERBOSE = true ] && echo "$(date) - Added default route back in" >> $logfile
|
[ $VERBOSE = true ] && echo "$(date) - Added default route back in" >> $logfile
|
||||||
|
|||||||
Reference in New Issue
Block a user