16 lines
318 B
Bash
16 lines
318 B
Bash
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
CONFIG_PATH=/data/options.json
|
||
|
|
||
|
CRON=$(jq --raw-output ".cron" $CONFIG_PATH)
|
||
|
|
||
|
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
|
||
|
touch /var/log/cron.log
|
||
|
tail -f /var/log/cron.log
|