Update emulator-sync-scripts.sh

This commit is contained in:
2024-02-20 18:17:33 -06:00
parent a5a1aab497
commit 2615977d56

View File

@@ -1,6 +1,6 @@
#!/bin/bash
VERS='1.1.9-10012023'
VERS='1.1.10-022020024'
source /opt/idssys/defaults/colors.inc
source /opt/idssys/defaults/default.inc
@@ -38,8 +38,8 @@ RUNSYNC(){
# echo -e "${idsCL[Red]}Failed${idsCL[Default]}"
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
# echo "Nextcloud sync failure, ${ES_LOGFOLDER}/failures2.txt exists."
# SENDNOTICE "Nextcloud Sync Failure" "${ES_LOGFOLDER}/failures2.txt Exists\n\n$(date)" 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
@@ -65,8 +65,8 @@ RUNSYNC(){
SENDNOTICE "Nextcloud Sync Fixed" "Sync is running again"
/bin/rm -f ${ES_LOGFOLDER}/failures*
elif [ -f ${ES_LOGFOLDER}/failures2.txt ] && [ -f ${ES_LOGFOLDER}/failures.txt ]; then
echo -e "${idsCL[Red]}Nextcloud 2nd sync failure"
SENDNOTICE "Nextcloud 2nd Sync Failure" "${ES_LOGFOLDER}/failures2.txt Exists\n\n$(date)" 1
echo -e "${idsCL[Red]}Nextcloud repeat sync failure"
SENDNOTICE "Nextcloud repeat Sync Failure" "${ES_LOGFOLDER}/failures2.txt Exists\n\n$(date)" 1
else
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
fi