Update mm-scripts.sh
This commit is contained in:
@@ -329,6 +329,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
|||||||
checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t)
|
checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t)
|
||||||
|
|
||||||
checked=false
|
checked=false
|
||||||
|
tryupdate=false
|
||||||
cc=0
|
cc=0
|
||||||
until [ "${checked}" = "" ]; do
|
until [ "${checked}" = "" ]; do
|
||||||
if [ "${checkport}" != "" ]; then
|
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
|
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
|
SENDNOTICE "${srvc} Service Issue" "${srvc} Service is not starting properly, will try and update" 1
|
||||||
checked=""
|
checked=""
|
||||||
tryupdate=true
|
tryupdate="true"
|
||||||
|
|
||||||
msg="Updating Service"
|
msg="Updating Service"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
@@ -352,7 +353,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
|||||||
|
|
||||||
done
|
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
|
UPDATESERVICE ${srvc} >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user