feat: migration
This commit is contained in:
18
src/entry.sh
Normal file
18
src/entry.sh
Normal 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
|
||||
Reference in New Issue
Block a user