docker_images/backups/rsyncvolumes/launch.c7.sh

10 lines
277 B
Bash

#!/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 && crond && tail -f /var/log/cron.log