Files
sqlite-backup-s3/scripts/entrypoint.sh
Vassiliy Yegorov 2875fc8334
All checks were successful
docker-build / Build image (push) Successful in 25s
fix root rigthts
2025-11-03 11:02:40 +07:00

15 lines
354 B
Bash

#!/bin/sh
set +e
# Create crontab in a writable location and set proper permissions
mkdir -p /tmp/crontabs
echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh >> /proc/1/fd/1 2>&1" > /tmp/crontabs/root
chmod 644 /tmp/crontabs/root
# Run initial backup
/scripts/backup.sh
# Start crond in foreground with debug output
exec crond -f -c /tmp/crontabs -d 0