mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-12-24 13:40:13 +01:00
update lockfile
This commit is contained in:
parent
3b3e74b0a2
commit
ea2d11c48b
11
bashclub-zfs
11
bashclub-zfs
@ -2,6 +2,15 @@
|
||||
# backup-zfs: use zfs send/recv to push/pull snapshots - New does not run twice
|
||||
prog="$(basename "$0")"
|
||||
|
||||
lockfilecheck="${!#}"
|
||||
|
||||
# Überprüfen, ob die Variable ".lock" enthält
|
||||
if [[ $lockfilecheck = *'.lock' ]]; then
|
||||
custom_lockfile="${lockfilecheck}"
|
||||
else
|
||||
custom_lockfile="bashclub-zfs.lock"
|
||||
fi
|
||||
|
||||
usage() {
|
||||
cat >&2 <<-EOF
|
||||
usage: $prog [-hvq] [-t tag] [-k keep] [-d dateopts] src dest
|
||||
@ -281,4 +290,4 @@ ZFS() {
|
||||
ZFS "$srchost" destroy -r $srcfs@$snap
|
||||
done
|
||||
|
||||
) 9>/var/lock/bashclub-zfs.lock
|
||||
) 9>/var/lock/$custom_lockfile
|
Loading…
Reference in New Issue
Block a user