backup-bot-two/abra.sh
3wc 5ea3fa442a
Some checks failed
continuous-integration/drone/push Build is failing
Move entrypoint script into Docker image
2024-04-09 22:36:29 -03:00

11 lines
367 B
Bash

export BACKUPBOT_VERSION=v1
export SSH_CONFIG_VERSION=v1
run_cron () {
schedule="$(crontab -l | tr -s " " | cut -d ' ' -f-5)"
rm -f /tmp/backup.log
echo "* * * * * $(crontab -l | tr -s " " | cut -d ' ' -f6-)" | crontab -
while [ ! -f /tmp/backup.log ]; do sleep 1; done
echo "$schedule $(crontab -l | tr -s " " | cut -d ' ' -f6-)" | crontab -
}