Update mm-scripts.sh

This commit is contained in:
2022-03-29 21:14:02 -05:00
parent 34267b4f66
commit 9d4cfd2e06

View File

@@ -68,22 +68,31 @@ MMSTART(){
((cc=${cc}+1))
sleep 1s
done
echo -e "${idsCL[Green]} done${idsCL[Default]}"
echo -en "${idsCL[LightCyan]}${mmsv} Services... ${idsCL[Default]}"
for srvc in "${SERVICES_CHECK[@]}"; do
/bin/systemctl start ${srvc}
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]}"
OUT=`ip a show $VPN_INTERFACE up` >/dev/null 2>&1
if [ ${#OUT} -ne 0 ]; then
echo -e "${idsCL[Green]} done${idsCL[Default]}"
echo -en "${idsCL[LightCyan]}${mmsv} Services... ${idsCL[Default]}"
for srvc in "${SERVICES_CHECK[@]}"; do
/bin/systemctl start ${srvc}
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 -e "${idsCL[Red]}Could not start the VPN, fix your shit...${idsCL[Default]}"
fi
rm -f /opt/mm.stop
rm -f /opt/mm.vpn.fail*
echo
echo -e "${idsCL[Green]}All services have been started${idsCL[Default]}"
echo
}
MMSTOP(){