mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-12-25 14:10: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
|
# backup-zfs: use zfs send/recv to push/pull snapshots - New does not run twice
|
||||||
prog="$(basename "$0")"
|
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() {
|
usage() {
|
||||||
cat >&2 <<-EOF
|
cat >&2 <<-EOF
|
||||||
usage: $prog [-hvq] [-t tag] [-k keep] [-d dateopts] src dest
|
usage: $prog [-hvq] [-t tag] [-k keep] [-d dateopts] src dest
|
||||||
@ -281,4 +290,4 @@ ZFS() {
|
|||||||
ZFS "$srchost" destroy -r $srcfs@$snap
|
ZFS "$srchost" destroy -r $srcfs@$snap
|
||||||
done
|
done
|
||||||
|
|
||||||
) 9>/var/lock/bashclub-zfs.lock
|
) 9>/var/lock/$custom_lockfile
|
Loading…
Reference in New Issue
Block a user