Update mm-scripts.sh
This commit is contained in:
@@ -335,18 +335,26 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
|||||||
if [ "${checkport}" != "" ]; then
|
if [ "${checkport}" != "" ]; then
|
||||||
checked=""
|
checked=""
|
||||||
fi
|
fi
|
||||||
if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; then
|
if [ "${checked}" == "false" ] && [ ${cc} -eq 4 ]; then
|
||||||
msg="${srvc^} Service is not starting properly, will try and update"
|
if [ -f ${MMFOLDER}/mm.${srvc}.starting ]; then
|
||||||
echo -e "${idsCL[Red]}${msg}${idsCL[Default]}"
|
msg="${srvc^} Service is not starting properly, will try and update"
|
||||||
echo "$(date) - ${msg}" >> $logfile
|
echo -e "${idsCL[Red]}${msg}${idsCL[Default]}"
|
||||||
SENDNOTICE "${srvc^} Service Issue" "${msg}" 1
|
echo "$(date) - ${msg}" >> $logfile
|
||||||
checked=""
|
SENDNOTICE "${srvc^} Service Issue" "${msg}" 1
|
||||||
tryupdate="true"
|
tryupdate="true"
|
||||||
|
|
||||||
msg="Updating ${srvc^} Service"
|
msg="Updating ${srvc^} Service"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||||
|
|
||||||
|
rm -f ${MMFOLDER}/mm.${srvc}.starting
|
||||||
|
|
||||||
|
else
|
||||||
|
touch ${MMFOLDER}/mm.${srvc}.starting
|
||||||
|
fi
|
||||||
|
checked=""
|
||||||
|
|
||||||
fi
|
fi
|
||||||
((cc=${cc}+1))
|
((cc=${cc}+1))
|
||||||
sleep 1s
|
sleep 1s
|
||||||
|
|||||||
Reference in New Issue
Block a user