From 45fba8428f16f6b86c9714e99be5b0091b6c70fe Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Mon, 22 Jun 2020 10:19:54 -0500 Subject: [PATCH] out to files --- gravity-sync.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 0a4e3eb..eebc5d9 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -1227,10 +1227,12 @@ function task_automate { MESSAGE="Removing Existing Automation" echo_stat - crontab -l > $CRON_TEMP - sed '/pull/d' $CRON_TEMP > $CRON_NEW - crontab $CRON_NEW 2>/dev/null + crontab -l > cronjob-old.tmp + sed '/pull/d' cronjob-old.tmp > cronjob-new.tmp + crontab cronjob-new.tmp 2>/dev/null error_validate + rm cronjob-old.tmp + rm cronjob-new.tmp fi MESSAGE="Saving New Automation"