feature(BACKUP): add SSH port customization
- borgSSHPort variable in details file - read and appended to RSH connection string - default to standard port 22 Closes github #9
This commit is contained in:
parent
de76918e81
commit
5ea25529b9
@ -20,6 +20,9 @@
|
||||
# default is "$HOME" or "~$USER" in that order. If you're unsure, try "$HOME"
|
||||
borgBaseDir = "/var/borgbackup"
|
||||
|
||||
# SSH port on which your borg server listens. By default, this is port 22.
|
||||
borgSSHPort = 22
|
||||
|
||||
# full path to the SSH key used to connect to your remote backup server
|
||||
borgSSHKey = "/var/borgbackup/private.key"
|
||||
|
||||
|
@ -529,7 +529,16 @@ elif [ ! -f "${borgSSHKey}" ]; then
|
||||
fi
|
||||
printf "%sdetails:borgSSHKey %s-- %s[OK]%s\n" \
|
||||
"$magenta" "$norm" "$ok" "$norm" >> "$logFile"
|
||||
export BORG_RSH="ssh -i ${borgSSHKey}"
|
||||
## check SSH port
|
||||
if [ -z "${borgSSHPort}" ]; then
|
||||
borgSSHPort=22
|
||||
printf "%sdetails:borgSSHPort %s-- %s[DEFAULT]%s\n" \
|
||||
"$magenta" "$norm" "$ok" "$norm" >> "$logFile"
|
||||
else
|
||||
printf "%sdetails:borgSSHPort %s-- %s[CUSTOM]%s\n" \
|
||||
"$magenta" "$norm" "$ok" "$norm" >> "$logFile"
|
||||
fi
|
||||
export BORG_RSH="ssh -i ${borgSSHKey} -p ${borgSSHPort}"
|
||||
|
||||
## check borg repo connect string
|
||||
if [ -z "${borgConnectRepo}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user