From 46d73fadf944fe4a798b3bf00e8d05ccd16fbe8a Mon Sep 17 00:00:00 2001 From: Fabio Cigliano Date: Tue, 11 Sep 2018 13:54:36 +0200 Subject: [PATCH] lamassu-update crontab path fix (#162) --- bin/lamassu-update | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/lamassu-update b/bin/lamassu-update index aade1b50..6fa42af7 100755 --- a/bin/lamassu-update +++ b/bin/lamassu-update @@ -60,6 +60,9 @@ supervisorctl update lamassu-server >> ${LOG_FILE} 2>&1 supervisorctl update lamassu-admin-server >> ${LOG_FILE} 2>&1 decho "updating backups conf" +tempfile=$(mktemp) +crontab -l >$tempfile +cat $tempfile | grep -v '@daily.*lamassu-backup-pg' | crontab - BACKUP_CMD=${NPM_BIN}/lamassu-backup-pg BACKUP_CRON="@daily $BACKUP_CMD > /dev/null" ( (crontab -l 2>/dev/null || echo -n "") | grep -v '@daily.*lamassu-backup-pg'; echo $BACKUP_CRON ) | crontab - >> $LOG_FILE 2>&1