update
This commit is contained in:
@@ -522,34 +522,36 @@ MMSTOP(){
|
||||
# done
|
||||
# echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
msg="Stopping Services"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||
for srvc in "${!MM_SERVICES[@]}"; do
|
||||
if [[ ${srvc} != *"qbittorrent"* ]] && [[ ${srvc} != *"vpn"* ]] && [[ ${srvc} != *"wireguard"* ]]; then
|
||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||
fi
|
||||
done
|
||||
sleep 2s
|
||||
/bin/systemctl stop qbittorrent
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
if [ "${SERVICESCHECK}" != "" ]; then
|
||||
msg="Stopping Services"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||
for srvc in "${!MM_SERVICES[@]}"; do
|
||||
if [[ ${srvc} != *"qbittorrent"* ]] && [[ ${srvc} != *"vpn"* ]] && [[ ${srvc} != *"wireguard"* ]]; then
|
||||
/bin/systemctl stop ${srvc} >/dev/null 2>&1 &
|
||||
fi
|
||||
done
|
||||
sleep 2s
|
||||
/bin/systemctl stop qbittorrent
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
msg="Waiting for Services to stop"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||
for srvc in "${!MM_SERVICES[@]}"; do
|
||||
if [ "MM_SERVICE_PORTS[${srvc}]" != "" ] && [[ ${srvc} != *"vpn"* ]] && [[ ${srvc} != *"wireguard"* ]]; then
|
||||
checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t)
|
||||
# echo "$srvc - ${MM_SERVICE_PORTS[${srvc}]} - $checkport"
|
||||
until [ "${checkport}" == "" ]; do
|
||||
sleep 1s
|
||||
msg="Waiting for Services to stop"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||
for srvc in "${!MM_SERVICES[@]}"; do
|
||||
if [ "MM_SERVICE_PORTS[${srvc}]" != "" ] && [[ ${srvc} != *"vpn"* ]] && [[ ${srvc} != *"wireguard"* ]]; then
|
||||
checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t)
|
||||
done
|
||||
fi
|
||||
done
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
# echo "$srvc - ${MM_SERVICE_PORTS[${srvc}]} - $checkport"
|
||||
until [ "${checkport}" == "" ]; do
|
||||
sleep 1s
|
||||
checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t)
|
||||
done
|
||||
fi
|
||||
done
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
msg="Shutting Down VPN Tunnel"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
|
||||
Reference in New Issue
Block a user