Skip to content

Commit

Permalink
Fix crontab install
Browse files Browse the repository at this point in the history
  • Loading branch information
sshnaidm committed Nov 8, 2018
1 parent 61eb72b commit 4a4bf54
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

function install_crontab {
pkill crond
crontab -l > /tmp/all_crontab
if [[ ! $(grep -Fxq "$(cat /app/crontab)" /tmp/all_crontab) ]]; then
cat /app/crontab >> /tmp/all_crontab
cat /tmp/all_crontab | crontab -
fi
crontab -l > /tmp/old_crontab
diff -q >/dev/null /app/crontab /tmp/old_crontab || cat /app/crontab | crontab -
crond -L /cidata/logs/cron.log
}

Expand Down

0 comments on commit 4a4bf54

Please sign in to comment.