diff --git a/mm-scripts.sh b/mm-scripts.sh index 5ebbd07..aa1be19 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -330,7 +330,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf for srvc in "${SERVICES_CHECK[@]}"; do [ "$(systemctl is-active ${srvc})" != "active" ] && /bin/systemctl restart ${srvc} - if [ "${MM_SERVICE_PORTS[${srvc}]}" != "" ]; then + if [ "${MM_SERVICE_PORTS[${srvc}]}" != "" ] && [ "${1}" == "check" ]; then checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t) tryupdate=false