Skip to content
Snippets Groups Projects
Commit 02c28a78 authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

borg: improve destination checks

parent 70f11dd7
Branches
Tags
No related merge requests found
...@@ -58,8 +58,10 @@ export BORG_PASSPHRASE="$passphrase" ...@@ -58,8 +58,10 @@ export BORG_PASSPHRASE="$passphrase"
[ -n "$include" ] || fatal "No source includes specified" [ -n "$include" ] || fatal "No source includes specified"
# destination specific checks # destination specific checks
[ "$directory" != "" ] || fatal "Destination directory not set" [ -n "$directory" ] || fatal "Destination directory not set"
if [ "$host" != "localhost" ]; then if [ "$host" != "localhost" ]; then
[ -n "$user" ] || fatal "Destination user not set"
[ -n "$host" ] || fatal "Destination host not set"
execstr_repository="ssh://${user}@${host}:${port}${directory}" execstr_repository="ssh://${user}@${host}:${port}${directory}"
else else
execstr_repository="$directory" execstr_repository="$directory"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment