mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-28 06:51:28 +00:00
feat(backup): allow no auth
This commit is contained in:
parent
696cb406a8
commit
5fd7b6c4ed
|
@ -15,8 +15,15 @@ class ResticBackuper(AbstractBackuper):
|
||||||
def rclone_args(self):
|
def rclone_args(self):
|
||||||
return "rclone.args=serve restic --stdio" + self.backend_rclone_args()
|
return "rclone.args=serve restic --stdio" + self.backend_rclone_args()
|
||||||
|
|
||||||
def backend_rclone_args(self, account: str, key: str):
|
def backend_rclone_args(self, account: str, key: str) -> str:
|
||||||
return f"{self.login_flag} {account} {self.key_flag} {key}"
|
acc_arg = ""
|
||||||
|
key_arg = ""
|
||||||
|
if account != "":
|
||||||
|
acc_arg = f"{self.login_flag} {account}"
|
||||||
|
if key != "":
|
||||||
|
key_arg = f"{self.key_flag} {key}"
|
||||||
|
|
||||||
|
return f"{acc_arg} {key_arg}"
|
||||||
|
|
||||||
def restic_command(self, account: str, key: str, *args):
|
def restic_command(self, account: str, key: str, *args):
|
||||||
return [
|
return [
|
||||||
|
|
Loading…
Reference in a new issue