backup-bot-two/abra.sh
Moritz 8798e2feb5
All checks were successful
continuous-integration/drone/push Build is passing
abra.sh: remove old BACKUPBOT_VERSION
2024-10-24 18:26:36 +02:00

10 lines
339 B
Bash

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 -
}