This commit is contained in:
2025-06-01 12:42:10 -05:00
parent caec4404a6
commit 116913a8d0
2 changed files with 18 additions and 9 deletions

View File

@@ -688,7 +688,7 @@ STATUS_NODE(){
######################################### #########################################
############ SERVICE REPAIRS ############ ############ 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 120 ]; 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 120 ] && [ "$(GETSKIP ${nip} host)" == "false" ]; then
if [ "${srvc}" == "pihole-FTL" ]; then if [ "${srvc}" == "pihole-FTL" ]; then
${SSHCMD} root@${nip} 'pihole -r' & >/dev/null 2>&1 ${SSHCMD} root@${nip} 'pihole -r' & >/dev/null 2>&1
touch ${NM_TMPFOLDER}/${nip}~${srvc}.fix touch ${NM_TMPFOLDER}/${nip}~${srvc}.fix

View File

@@ -1272,6 +1272,8 @@ LIST_SKIPPED_SERVERS(){
GETSKIP(){ GETSKIP(){
nip="${1}" nip="${1}"
NCMD="ssh -tq -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip}" NCMD="ssh -tq -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip}"
if [ "${2}" == "" ]; then
NODE="${NM_HOSTNAMES[${nip}]} [${nip}]" NODE="${NM_HOSTNAMES[${nip}]} [${nip}]"
tmpfile=/tmp/.nodeskipcheck.${NM_HOSTNAMES[${nip}]// /-} tmpfile=/tmp/.nodeskipcheck.${NM_HOSTNAMES[${nip}]// /-}
@@ -1283,6 +1285,13 @@ GETSKIP(){
echo -e "${idsCL[Yellow]}OFFLINE${idsCL[Default]}" >> ${tmpfile}.running echo -e "${idsCL[Yellow]}OFFLINE${idsCL[Default]}" >> ${tmpfile}.running
fi fi
[ -f ${tmpfile}.running ] && mv ${tmpfile}.running ${tmpfile}.done || touch ${tmpfile}.done [ -f ${tmpfile}.running ] && mv ${tmpfile}.running ${tmpfile}.done || touch ${tmpfile}.done
else
RESULT=false
if [ $(CHECK_HOST ${nip}) != false ]; then
${NCMD} [ -f ${NM_TMPFOLDER}/.skip ] && RESULT=true
fi
echo ${RESULT}
fi
} }
BETACHECK(){ BETACHECK(){