capture job output

This commit is contained in:
Paolo Asperti 2019-03-11 10:13:57 +01:00
parent 62b6cb3ffe
commit eef1ac29d3
Signed by: paspo
GPG Key ID: 06D46905D19D5182
2 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{
"name": "Auto Snapshot",
"url": "https://git.asperti.com/paspo/hassio-addons",
"version": "0.1.1",
"version": "0.1.2",
"slug": "auto-snapshot",
"description": "Take hassio snapshots with fixed timings and manage retention",
"startup": "before",

View File

@ -5,10 +5,12 @@ CONFIG_PATH=/data/options.json
CRON=$(jq --raw-output ".cron" $CONFIG_PATH)
echo "$CRON /snapshot.sh" > /var/spool/cron/crontabs/root
echo "$CRON /snapshot.sh >> /var/log/cron.log" > /var/spool/cron/crontabs/root
# change perms
chmod 600 /var/spool/cron/crontabs/root
echo "Auto Snapshot ready."
crond -f
crond
touch /var/log/cron.log
tail -f /var/log/cron.log