hassio-addons/auto-snapshot/run.sh

16 lines
318 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)
2019-03-11 09:13:57 +00:00
echo "$CRON /snapshot.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
2019-03-10 17:30:11 +00:00
echo "Auto Snapshot ready."
2019-03-11 09:13:57 +00:00
crond
touch /var/log/cron.log
tail -f /var/log/cron.log