]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
add key check exists
authorBastian Dehn <hhaalo@arcor.de>
Sun, 25 May 2025 13:16:02 +0000 (15:16 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 25 May 2025 13:16:02 +0000 (15:16 +0200)
backupmount

index 7371da40023723fc28412bc9fdcc317906bcaf53..1b627b4842dccb63fae4cd8a1d9b69294a56e459 100755 (executable)
@@ -60,6 +60,9 @@ device_mount()
        [ "$key" != "null" ] \
                || errlog "config.yaml key for $media missing" \
                || return $?
+       [ -f "$key" ] \
+               || errlog "key $key not exists" \
+               || return $?
        infolog "use key $key"
        local volume=$(cat "config.yaml" \
                | yq --raw-output ".backup_volume")