docker_images/backups/rsyncvolumes/launch.sh

10 lines
276 B
Bash
Raw Normal View History

#!/bin/bash
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