feat: migration

This commit is contained in:
2023-04-28 21:37:39 +02:00
parent 6db128c80a
commit 6bdf45534f
4 changed files with 73 additions and 0 deletions

18
src/entry.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
mkdir /etc/cron.d
touch /etc/cron.d/backup
echo "$INTERVAL /bin/sh /app/backup.sh" > /etc/cron.d/backup
# change ownership and make the cron known to crontab
chmod 0644 /etc/cron.d/backup && crontab /etc/cron.d/backup
if [ $RUNONSTART = 'true' ]; then
echo $(date +"%Y-%m-%dT%T") "- Running initial backup"
/bin/sh /app/backup.sh
fi
# Wait until infinity
echo $(date +"%Y-%m-%dT%T") "- Starting cron"
crond -f