docker_images/backups/rsyncvolumes/launch.c7.sh

10 lines
277 B
Bash
Raw Normal View History

2020-05-17 08:25:07 +02:00
#!/bin/bash
printenv >> /etc/environment
2020-05-17 08:25:07 +02:00
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
2020-05-17 08:25:07 +02:00
crontab ./crontab && touch /var/log/cron.log && crond && tail -f /var/log/cron.log