From 7fe7fef24450e1e9891b4468a40ceb048fa8e646 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 6 Mar 2020 17:22:48 +0200 Subject: [PATCH] Added better formatting to cron message. --- sync.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sync.sh b/sync.sh index 01e61ff..d8ae599 100755 --- a/sync.sh +++ b/sync.sh @@ -140,16 +140,17 @@ function setCron () { echo "" >> "${CRONPATH}" fi # get the Source Database IP/Domain - echo -ne "\n Add the cron timer here so you sync will run every day at 4am.\n" - echo -ne " # That will look like our example below, see https://crontab.guru/#0_4_*_*_* for more details.\n" - read -e -p " # Example (0 4 * * *): " -i "0 4 * * *" INPUT_CRON_CICLE + echo -e "\n ################################################################################################" + echo -ne " ## Add the CRON TIMER here so you sync will run every day at 4am.\n" + echo -ne " ## That will look like our example below, see https://crontab.guru/#0_4_*_*_* for more details.\n" + echo -e " ################################################################################################" + read -e -p " ## Example (0 4 * * *): " -i "0 4 * * *" INPUT_CRON_CICLE # check if the @reboot curl -s $SCRIPTURL | sudo bash is already set if [[ $currentCron != *"${INPUT_CRON_CICLE} curl -s $SCRIPTURL | bash"* ]]; then echo "${INPUT_CRON_CICLE} curl -s $SCRIPTURL | bash" >> "${CRONPATH}" fi # set the user cron crontab -u $ACTIVEUSER "${CRONPATH}" - echo "Done" fi }