Update emulator-sync-scripts.sh
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERS='1.1.10-022020024'
|
VERS='1.1.12-040220024'
|
||||||
|
|
||||||
source /opt/idssys/defaults/colors.inc
|
source /opt/idssys/defaults/colors.inc
|
||||||
source /opt/idssys/defaults/default.inc
|
source /opt/idssys/defaults/default.inc
|
||||||
@@ -41,12 +41,7 @@ RUNSYNC(){
|
|||||||
# echo "Nextcloud sync failure, ${ES_LOGFOLDER}/failures2.txt exists."
|
# echo "Nextcloud sync failure, ${ES_LOGFOLDER}/failures2.txt exists."
|
||||||
# SENDNOTICE "Nextcloud Sync Failure" "${ES_LOGFOLDER}/failures2.txt Exists\n\n$(date)" 1
|
# 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
|
[ $(expr `date +%s` - $(stat -c %Y ${ES_LOGFOLDER}/failures.txt)) -gt 1800 ] && /bin/rm -f ${ES_LOGFOLDER}/failures.txt
|
||||||
/bin/rm -f ${ES_LOGFOLDER}/failures.txt
|
|
||||||
else
|
|
||||||
/bin/rm -f ${ES_FOLDER}/nc-sync.running
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
/bin/mv ${ES_LOGFOLDER}/failures.txt ${ES_LOGFOLDER}/failures2.txt
|
/bin/mv ${ES_LOGFOLDER}/failures.txt ${ES_LOGFOLDER}/failures2.txt
|
||||||
fi
|
fi
|
||||||
@@ -75,14 +70,13 @@ RUNSYNC(){
|
|||||||
else
|
else
|
||||||
if [ -f ${ES_FOLDER}/mount.failure ]; then
|
if [ -f ${ES_FOLDER}/mount.failure ]; then
|
||||||
SENDNOTICE "Nextcloud Sync Unmounted" "The folder ${NC_PATH} Cannot be mounted" 1
|
SENDNOTICE "Nextcloud Sync Unmounted" "The folder ${NC_PATH} Cannot be mounted" 1
|
||||||
/bin/rm -f ${ES_FOLDER}/nc-sync.running
|
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
/usr/bin/mount -a
|
/usr/bin/mount -a
|
||||||
touch ${ES_FOLDER}/mount.failure
|
touch ${ES_FOLDER}/mount.failure
|
||||||
/bin/rm -f ${ES_FOLDER}/nc-sync.running
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
/bin/rm -f ${ES_FOLDER}/nc-sync.running
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -102,3 +96,4 @@ esac
|
|||||||
|
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user