Skip to content

Commit 79b8442

Browse files
xerufjaapmarcus
andauthored
bin/v-add-backup-host: report inability to connect via sftp (hestiacp#4119)
* bin/v-add-backup-host: report inability to connect via sftp Previously it silently failed, see https://forum.hestiacp.com/t/allow-manual-backups-when-backup-system-is-disabled/10690/10 * Update v-add-backup-host --------- Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent ca40d98 commit 79b8442

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/v-add-backup-host

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,11 @@ if [ "$type" = 'sftp' ]; then
242242
fi
243243
fi
244244
rc=$?
245-
if [[ "$rc" != 0 ]]; then
245+
if [[ "$rc" -ne 0 ]]; then
246246
case $rc in
247247
$E_CONNECT) echo "Error: can't login to sftp $user@$host" ;;
248248
$E_FTP) echo "Error: can't create temp folder on the sftp host" ;;
249+
*) echo "Error Unable to connect via sftp.";;
249250
esac
250251
log_event "$rc" "$ARGUMENTS"
251252
exit "$rc"

0 commit comments

Comments
 (0)