From 37a7952a1cc86c2077c4da8ef935a0632d93a88c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 15 Jul 2023 16:03:09 -0500 Subject: [PATCH] Update emulator-sync-scripts.sh --- emulator-sync-scripts.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/emulator-sync-scripts.sh b/emulator-sync-scripts.sh index 070031f..c07fb10 100755 --- a/emulator-sync-scripts.sh +++ b/emulator-sync-scripts.sh @@ -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"