We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e861eb commit 3bf6a39Copy full SHA for 3bf6a39
bin/v-add-backup-host
@@ -137,8 +137,10 @@ if [ "$type" = 'sftp' ]; then
137
if [ -z $port ]; then
138
port=22
139
fi
140
- sftmpdir="$path/vst.bK76A9SUkt"
141
- sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
+ if sftpc "mkdir $path" > /dev/null 2>&1 ; then
+ sftmpdir="$path/vst.bK76A9SUkt"
142
+ sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
143
+ fi
144
rc=$?
145
if [[ "$rc" != 0 ]]; then
146
case $rc in
0 commit comments