From 285d0c493428d6309e9d6bf417398402512fd5f0 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Thu, 29 May 2025 08:48:44 +0200 Subject: [PATCH] add check command availables --- backup | 9 --------- backupmount | 4 ++++ restore | 10 ++++++++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/backup b/backup index b106672..6656344 100755 --- a/backup +++ b/backup @@ -286,15 +286,6 @@ main() command -v ssh > /dev/null \ || errlog "command ssh not found" \ || return $? - command -v savelog > /dev/null \ - || errlog "command savelog not found" \ - || return $? - command -v du > /dev/null \ - || errlog "command du not found" \ - || return $? - command -v wc > /dev/null \ - || errlog "command wc not found" \ - || return $? [ -f "config.yaml" ] \ || errlog "file config.yaml not found" \ || return $? diff --git a/backupmount b/backupmount index 1b627b4..8bb65d7 100755 --- a/backupmount +++ b/backupmount @@ -143,6 +143,10 @@ main() command -v yq > /dev/null \ || errlog "command yq not found" \ || return $? + command -v cryptsetup > /dev/null \ + || errlog "command cryptsetup not found" \ + || return $? + [ -n "$cmd" ] \ || errlog "missing command" \ || return $? diff --git a/restore b/restore index a800a42..2020d40 100755 --- a/restore +++ b/restore @@ -154,10 +154,16 @@ main() esac done - command -v yq > /dev/null || errlog "yq command not found" || return $? + command -v yq > /dev/null \ + || errlog "command yq not found" \ + || return $? command -v rsync > /dev/null \ - || errlog "rsync command not found" \ + || errlog "command rsync not found" \ + || return $? + command -v ssh > /dev/null \ + || errlog "command ssh not found" \ || return $? + [ -f "config.yaml" ] \ || errlog "file config.yaml not found" \ || return $? -- 2.39.5