From c83e0b4f91a47357bad8538ba8397013822d994c Mon Sep 17 00:00:00 2001 From: Eva Date: Sun, 19 Nov 2023 18:54:09 -0500 Subject: [PATCH] Update install Don't try to write to the crontab if there's no `/etc/crontab` --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index fe82b78..ac68d39 100644 --- a/install +++ b/install @@ -36,7 +36,7 @@ function run() { echo "inventory_git_url=$INVENTORY_GIT_URL" >> $CONFIG_FILE fi - if [[ "$NO_CRON" != "true" ]]; then + if [[ "$NO_CRON" != "true" ]] && [[ -d "/etc/crontab" ]]; then echo Adding entry to /etc/crontab... echo "$(cat /etc/crontab | grep -v $AV_PATH)" > /etc/crontab echo "* * * * * root $AV_PATH directive >> /var/log/aviary-directive.log 2>&1" >> /etc/crontab