mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-25 14:08:09 +00:00
fix: do not use append mode while editing cron jobs.
This commit is contained in:
parent
95179fbe6e
commit
301e2326db
@ -259,22 +259,17 @@ gitlab_start () {
|
||||
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
|
||||
|
||||
# setup cron job for automatic backups
|
||||
set +e
|
||||
crontab -l -u git > /tmp/cron.git
|
||||
set -e
|
||||
case "${GITLAB_BACKUPS}" in
|
||||
daily)
|
||||
cat >> /tmp/cron.git <<EOF
|
||||
sudo -u git -H cat > /tmp/cron.git <<EOF
|
||||
00 02 * * * cd /home/git/gitlab && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:create RAILS_ENV=production
|
||||
EOF
|
||||
;;
|
||||
monthly)
|
||||
cat >> /tmp/cron.git <<EOF
|
||||
sudo -u git -H cat > /tmp/cron.git <<EOF
|
||||
00 02 01 * * cd /home/git/gitlab && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:create RAILS_ENV=production
|
||||
EOF
|
||||
;;
|
||||
disable|*)
|
||||
;;
|
||||
esac
|
||||
crontab -u git /tmp/cron.git && rm -rf /tmp/cron.git
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user