Update mm-scripts.sh

This commit is contained in:
2023-03-25 11:42:58 -05:00
parent e7a4cd2fc6
commit a7ad6819bd

View File

@@ -323,7 +323,14 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
for srvc in "${SERVICES_CHECK[@]}"; do
/bin/systemctl start ${srvc}
if [ "$(systemctl is-active ${srvc})" != "active" ]; then
/bin/systemctl start ${srvc}
sleep 5s
fi
checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t)
if [ "${checkport}" == "" ] && [ -f /opt/${srvc}-update.sh ]; then
/opt/${srvc}-update.sh
fi
done
echo -e "${idsCL[Green]}Done${idsCL[Default]}"