diff --git a/inc/status.inc b/inc/status.inc index ee4b3c7a..7acfe1d3 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -697,13 +697,13 @@ STATUS_NODE(){ ######################################### ############ SERVICE REPAIRS ############ - if [ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.disable ] && [ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.fix ] && [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.down)) -gt 90 ]; then + if [ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.disable ] && (([ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.fix ] && [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.down)) -gt 90 ]) || ([ -f ${NM_TMPFOLDER}/${nip}~${srvc}.fix ] && [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.fix)) -gt 600 ])); then if [ "${srvc}" == "pihole-FTL" ]; then ${SSHCMD} root@${nip} 'pihole -r' & >/dev/null 2>&1 touch ${NM_TMPFOLDER}/${nip}~${srvc}.fix - elif [ "${srvc}" == "proxlb" ]; then + elif [ "${srvc}" == "proxlb" ]; then ${SSHCMD} root@${nip} 'systemctl restart proxlb' & >/dev/null 2>&1 touch ${NM_TMPFOLDER}/${nip}~${srvc}.fix fi