Further cron logic cleanups

This commit is contained in:
Jonathan Carter 2017-09-18 09:25:02 +02:00
parent d49be6a2de
commit 277287f824
5 changed files with 13 additions and 9 deletions

View File

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

View File

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

View File

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