Update mm-scripts.sh

This commit is contained in:
2022-05-07 23:09:14 -05:00
parent fd86ff6d4b
commit 92b0e867b7

View File

@@ -73,6 +73,21 @@ MMSTART(){
/bin/ip route add default via $(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
echo -e "${idsCL[Green]} done${idsCL[Default]}"
echo -en "${idsCL[LightCyan]}Verifing default network routes... ${idsCL[Default]}"
checked=false
cc=0
until [ "${checked}" = "" ]; do
zerogw=$(netstat -r | grep '0.0.0.0' | head -1 | awk '{ print $2}')
defaultgw=$(netstat -r | grep 'default' | head -1 | awk '{ print $2}')
if [ "${zerogw}" = "${defaultgw}" ]; then
checked=""
fi
((cc=${cc}+1))
sleep 1s
done
echo -e "${idsCL[Green]} done${idsCL[Default]}"
echo
echo -en "${idsCL[LightCyan]}${mmsv} Services... ${idsCL[Default]}"
for srvc in "${SERVICES_CHECK[@]}"; do