All checks were successful
docker-build / Build image (push) Successful in 35s
18 lines
427 B
Bash
18 lines
427 B
Bash
#!/bin/sh
|
|
|
|
# Create crontab in a writable location and set proper permissions
|
|
mkdir -p /tmp/crontabs
|
|
echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh" > /tmp/crontabs/root
|
|
chmod 644 /tmp/crontabs/root
|
|
|
|
# Run initial backup
|
|
/scripts/backup.sh
|
|
|
|
# Start crond with debug output
|
|
echo "Starting crond with config:"
|
|
cat /tmp/crontabs/root
|
|
echo "---"
|
|
|
|
# Start crond in foreground with debug output
|
|
exec crond -f -c /tmp/crontabs -d 8
|