diff --git a/backups/rsyncvolumes/launch.c7.sh b/backups/rsyncvolumes/launch.c7.sh index e14ccb0..9831012 100644 --- a/backups/rsyncvolumes/launch.c7.sh +++ b/backups/rsyncvolumes/launch.c7.sh @@ -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 diff --git a/backups/rsyncvolumes/launch.sh b/backups/rsyncvolumes/launch.sh index b346039..6a200fc 100644 --- a/backups/rsyncvolumes/launch.sh +++ b/backups/rsyncvolumes/launch.sh @@ -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