From cdbfbbf579a13feddf2cd5c3ca70fea2307a249f Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 1 Oct 2023 14:49:11 -0500 Subject: [PATCH] Update emulator-sync-scripts.sh --- emulator-sync-scripts.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/emulator-sync-scripts.sh b/emulator-sync-scripts.sh index cb47bfa..51b424b 100755 --- a/emulator-sync-scripts.sh +++ b/emulator-sync-scripts.sh @@ -40,8 +40,13 @@ RUNSYNC(){ if [ -f ${ES_LOGFOLDER}/failures2.txt ]; then echo "Nextcloud sync failure, ${ES_LOGFOLDER}/failures2.txt exists." SENDNOTICE "Nextcloud Sync Failure" "${ES_LOGFOLDER}/failures2.txt Exists\n\n$(date)" 1 - /bin/rm -f ${ES_FOLDER}/nc-sync.running - exit 1 + + if [ -f "${NM_TMPFOLDER}/status-check.running" ] && [ $(expr `date +%s` - $(stat -c %Y ${NM_TMPFOLDER}/status-check.running)) -gt 1800 ]; then + /bin/rm -f ${ES_LOGFOLDER}/failures.txt + else + /bin/rm -f ${ES_FOLDER}/nc-sync.running + exit 1 + fi else /bin/mv ${ES_LOGFOLDER}/failures.txt ${ES_LOGFOLDER}/failures2.txt fi