6 Commits

Author SHA1 Message Date
277287f824 Further cron logic cleanups 2017-09-18 09:25:02 +02:00
d49be6a2de Merge pull request #69 from mailinglists35/patch-4
make --quiet really quiet
2017-09-14 11:22:43 +02:00
2e1f309131 Merge pull request #68 from lindhe/fix-broken-cron
Fix broken cron scripts
2017-07-11 13:44:13 +02:00
1666623191 make --quiet really quiet
--quiet still prints the name of the datasets when print_log is called at lines 548/551
2017-07-06 13:15:56 +03:00
739972f18a Found a way to exec the process and yet have it work 2017-07-06 09:20:54 +02:00
8c45add2c0 Fix broken cron scripts
I found that none of the daily, hourly, weekly or monthly snapshots were
being taken. When I looked into it I found that the scripts didn't
execute properly, because of the newly introduced check (9c6f065).

I'm not versed enough with POSIX to understand if there was some clever
intention with using exec than just calling which by it self, but it
works without exec so I removed it.
2017-07-05 23:21:29 +02:00
6 changed files with 14 additions and 10 deletions

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
# Only call zfs-auto-snapshot if it's available # Only call zfs-auto-snapshot if it's available
exec which zfs-auto-snapshot > /dev/null && \ which zfs-auto-snapshot > /dev/null || exit 0
zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //
exec zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //

View File

@ -1,3 +1,3 @@
PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
*/15 * * * * root which zfs-auto-snapshot > /dev/null && zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 // */15 * * * * root which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
# Only call zfs-auto-snapshot if it's available # Only call zfs-auto-snapshot if it's available
exec which zfs-auto-snapshot > /dev/null && \ which zfs-auto-snapshot > /dev/null || exit 0
zfs-auto-snapshot --quiet --syslog --label=hourly --keep=24 //
exec zfs-auto-snapshot --quiet --syslog --label=hourly --keep=24 //

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
# Only call zfs-auto-snapshot if it's available # Only call zfs-auto-snapshot if it's available
exec which zfs-auto-snapshot > /dev/null && \ which zfs-auto-snapshot > /dev/null || exit 0
zfs-auto-snapshot --quiet --syslog --label=monthly --keep=12 //
exec zfs-auto-snapshot --quiet --syslog --label=monthly --keep=12 //

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
# Only call zfs-auto-snapshot if it's available # Only call zfs-auto-snapshot if it's available
exec which zfs-auto-snapshot > /dev/null && \ which zfs-auto-snapshot > /dev/null || exit 0
zfs-auto-snapshot --quiet --syslog --label=weekly --keep=8 //
exec zfs-auto-snapshot --quiet --syslog --label=weekly --keep=8 //

View File

@ -110,7 +110,7 @@ print_log () # level, message, ...
;; ;;
(inf*) (inf*)
# test -n "$opt_syslog" && logger -t "$opt_prefix" -p daemon.info $* # test -n "$opt_syslog" && logger -t "$opt_prefix" -p daemon.info $*
test -n "$opt_verbose" && echo $* test -z ${opt_quiet+x} && test -n "$opt_verbose" && echo $*
;; ;;
(deb*) (deb*)
# test -n "$opt_syslog" && logger -t "$opt_prefix" -p daemon.debug $* # test -n "$opt_syslog" && logger -t "$opt_prefix" -p daemon.debug $*