1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

fix(rsync-backup): Provide default port 22 for rsync usage in backup.py (#2226)

Co-authored-by: Hugh Secker-Walker <hsw+miac@hodain.net>
This commit is contained in:
Hugh Secker-Walker 2023-01-28 11:04:46 -05:00 committed by GitHub
parent 5e3e4a2161
commit 4408cb1fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,6 +221,8 @@ def get_duplicity_additional_args(env):
port = urlsplit(config["target"]).port
except ValueError:
port = 22
if port is None:
port = 22
return [
f"--ssh-options= -i /root/.ssh/id_rsa_miab -p {port}",
@ -424,6 +426,8 @@ def list_target_files(config):
port = target.port
except ValueError:
port = 22
if port is None:
port = 22
target_path = target.path
if not target_path.endswith('/'):