diff --git a/mm-scripts.sh b/mm-scripts.sh index 592c4b2..f89ad4b 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -329,6 +329,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t) checked=false + tryupdate=false cc=0 until [ "${checked}" = "" ]; do if [ "${checkport}" != "" ]; then @@ -339,7 +340,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf echo "$(date) - ${srvc} Service is not starting properly, will try and update" >> $logfile SENDNOTICE "${srvc} Service Issue" "${srvc} Service is not starting properly, will try and update" 1 checked="" - tryupdate=true + tryupdate="true" msg="Updating Service" c=0; spc=''; spc1=$((${cw_spc}-${#msg})) @@ -352,7 +353,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf done - if ([ "${checkport}" == "" ] || [ ${tryupdate} == true ]) && [ "${MM_UPDATE_REPO[${srvc}]}" != "" ]; then + if ([ "${checkport}" == "" ] || [ "${tryupdate}" == "true" ]) && [ "${MM_UPDATE_REPO[${srvc}]}" != "" ]; then UPDATESERVICE ${srvc} >/dev/null 2>&1 fi done