]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
add check command availables master
authorBastian Dehn <hhaalo@arcor.de>
Thu, 29 May 2025 06:48:44 +0000 (08:48 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 29 May 2025 06:48:44 +0000 (08:48 +0200)
backup
backupmount
restore

diff --git a/backup b/backup
index b10667280dc35d46ca5745b35d8d261c93bd0ac1..6656344faa480889954d0b0110a2215329ca9eb8 100755 (executable)
--- 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 $?
index 1b627b4842dccb63fae4cd8a1d9b69294a56e459..8bb65d7d3103aa483a8b953a4f69867df283edf3 100755 (executable)
@@ -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 a800a4280db14b4f9705139c845059a6a050c830..2020d40edd3702e853ddde15d3b3ed1836248756 100755 (executable)
--- 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 $?