capture job output
This commit is contained in:
parent
62b6cb3ffe
commit
eef1ac29d3
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Auto Snapshot",
|
"name": "Auto Snapshot",
|
||||||
"url": "https://git.asperti.com/paspo/hassio-addons",
|
"url": "https://git.asperti.com/paspo/hassio-addons",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"slug": "auto-snapshot",
|
"slug": "auto-snapshot",
|
||||||
"description": "Take hassio snapshots with fixed timings and manage retention",
|
"description": "Take hassio snapshots with fixed timings and manage retention",
|
||||||
"startup": "before",
|
"startup": "before",
|
||||||
|
@ -5,10 +5,12 @@ CONFIG_PATH=/data/options.json
|
|||||||
|
|
||||||
CRON=$(jq --raw-output ".cron" $CONFIG_PATH)
|
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
|
# change perms
|
||||||
chmod 600 /var/spool/cron/crontabs/root
|
chmod 600 /var/spool/cron/crontabs/root
|
||||||
|
|
||||||
echo "Auto Snapshot ready."
|
echo "Auto Snapshot ready."
|
||||||
crond -f
|
crond
|
||||||
|
touch /var/log/cron.log
|
||||||
|
tail -f /var/log/cron.log
|
Loading…
Reference in New Issue
Block a user