[IMP]RsyncVolumes : optional hourly rsync

This commit is contained in:
Fabien BOURGEOIS 2021-03-13 20:17:33 +01:00
parent 570c5e7f9e
commit d602b11979
2 changed files with 8 additions and 0 deletions

View File

@ -2,4 +2,8 @@
printenv >> /etc/environment
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
if [ "$NO_RSYNC" == 1 ]; then
sed -i '/rsync.sh/d' ./crontab
rm /opt/backup/rsync.*
fi
crontab ./crontab && touch /var/log/cron.log && crond && tail -f /var/log/cron.log

View File

@ -2,4 +2,8 @@
printenv >> /etc/environment
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
if [ "$NO_RSYNC" == 1 ]; then
sed -i '/rsync.sh/d' ./crontab
rm /opt/backup/rsync.*
fi
crontab ./crontab && touch /var/log/cron.log && cron && tail -f /var/log/cron.log