Update mm-scripts.sh
This commit is contained in:
@@ -68,22 +68,31 @@ MMSTART(){
|
|||||||
((cc=${cc}+1))
|
((cc=${cc}+1))
|
||||||
sleep 1s
|
sleep 1s
|
||||||
done
|
done
|
||||||
echo -e "${idsCL[Green]} done${idsCL[Default]}"
|
|
||||||
echo -en "${idsCL[LightCyan]}${mmsv} Services... ${idsCL[Default]}"
|
|
||||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
OUT=`ip a show $VPN_INTERFACE up` >/dev/null 2>&1
|
||||||
/bin/systemctl start ${srvc}
|
if [ ${#OUT} -ne 0 ]; then
|
||||||
echo ""
|
echo -e "${idsCL[Green]} done${idsCL[Default]}"
|
||||||
done
|
echo -en "${idsCL[LightCyan]}${mmsv} Services... ${idsCL[Default]}"
|
||||||
echo -e "${idsCL[Green]} done${idsCL[Default]}"
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
if [ "${action}" == "start" ]; then
|
/bin/systemctl start ${srvc}
|
||||||
echo -e "${idsCL[LightCyan]}It may take a couple of minutes before all systems fully start up${idsCL[Default]}"
|
echo ""
|
||||||
|
done
|
||||||
|
echo -e "${idsCL[Green]} done${idsCL[Default]}"
|
||||||
|
if [ "${action}" == "start" ]; then
|
||||||
|
echo -e "${idsCL[LightCyan]}It may take a couple of minutes before all systems fully start up${idsCL[Default]}"
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
rm -f /opt/mm.stop
|
||||||
|
rm -f /opt/mm.vpn.fail*
|
||||||
|
echo
|
||||||
|
echo -e "${idsCL[Green]}All services have been started${idsCL[Default]}"
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[Red]} failed${idsCL[Default]}"
|
||||||
echo
|
echo
|
||||||
|
echo -e "${idsCL[Red]}Could not start the VPN, fix your shit...${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
rm -f /opt/mm.stop
|
|
||||||
rm -f /opt/mm.vpn.fail*
|
|
||||||
echo
|
echo
|
||||||
echo -e "${idsCL[Green]}All services have been started${idsCL[Default]}"
|
|
||||||
echo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MMSTOP(){
|
MMSTOP(){
|
||||||
|
|||||||
Reference in New Issue
Block a user