hassio-addons/auto-backup/run.sh

16 lines
314 B
Bash
Raw Normal View History

2019-03-10 17:09:12 +00:00
#!/bin/bash
set -e
CONFIG_PATH=/data/options.json
CRON=$(jq --raw-output ".cron" $CONFIG_PATH)
2021-09-07 21:37:54 +00:00
echo "$CRON /backup.sh >> /var/log/cron.log" > /var/spool/cron/crontabs/root
2019-03-10 17:09:12 +00:00
# change perms
chmod 600 /var/spool/cron/crontabs/root
2021-09-07 21:37:54 +00:00
echo "Auto backup ready."
2019-03-11 09:13:57 +00:00
crond
touch /var/log/cron.log
tail -f /var/log/cron.log