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.
This commit is contained in:
Andreas Lindhé
2017-07-05 23:11:43 +02:00
parent 9c6f065589
commit 8c45add2c0
4 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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