Update emulator-sync-scripts.sh
This commit is contained in:
@@ -31,8 +31,12 @@ RUNSYNC(){
|
||||
fi
|
||||
|
||||
if [ -f ${NC_PATH}/mounted ] || [ "${1}" == "skipmount" ]; then
|
||||
echo -en "${idsCL[LightCyan]}Sync Started : ${idsCL[Default]}"
|
||||
|
||||
[ -f ${ESFOLDER}/mount.failure ] && /bin/rm -f ${ESFOLDER}/mount.failure
|
||||
if [ -f ${SYNC_FOLDER}/failures.txt ]; then
|
||||
echo -e "${idsCL[Red]}Failed${idsCL[Default]}"
|
||||
|
||||
if [ -f ${SYNC_FOLDER}/failures2.txt ]; then
|
||||
echo "Nextcloud sync failure, ${SYNC_FOLDER}/failures.txt exists."
|
||||
SENDNOTICE "Nextcloud Sync Failure" "${SYNC_FOLDER}/failures.txt Exists\n\n$(date)" 1
|
||||
@@ -43,9 +47,8 @@ RUNSYNC(){
|
||||
fi
|
||||
fi
|
||||
if [ ! -f ${SYNC_FOLDER}/failures.txt ]; then
|
||||
echo "Sync Started"
|
||||
${ESFOLDER}/nextcloud-sync-cron/nextcloud-sync-cron.sh --verbose --logdir ${SYNC_FOLDER} ${ESFOLDER}/nextcloud-client.conf
|
||||
echo "Sync Finished"
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
if [ -f ${SYNC_FOLDER}/failures2.txt ] && [ ! -f ${SYNC_FOLDER}/failures.txt ]; then
|
||||
echo "$(date): Fixed" >> ${NC_PATH}/sync.log
|
||||
SENDNOTICE "Nextcloud Sync Fixed" "Sync is running again"
|
||||
|
||||
Reference in New Issue
Block a user