This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
kopia/entrypoint.sh

15 lines
340 B
Bash
Raw Normal View History

2023-08-17 15:00:22 +00:00
#!/bin/sh
2023-08-17 08:35:51 +00:00
2023-08-17 15:00:22 +00:00
CRONTAB=/etc/cron.d/kopia-backup
2023-08-17 08:47:34 +00:00
2023-08-17 15:36:27 +00:00
printenv > /etc/environment
echo "Running cron with schedule ${KOPIA_CRON_SCHEDULE}"
2023-08-17 08:47:34 +00:00
2023-08-17 15:13:14 +00:00
echo "${KOPIA_CRON_SCHEDULE} /run-backup.sh > /var/log/kopia-backup.log 2>&1" > ${CRONTAB}
2023-08-17 15:00:22 +00:00
chmod 0644 ${CRONTAB}
crontab ${CRONTAB}
2023-08-17 15:16:22 +00:00
touch /var/log/kopia-backup.log
cron && tail -f /var/log/kopia-backup.log