Update 'backup/generate-config.py'

pull/4/head
drunkendog 2022-12-19 18:21:07 +00:00
parent c1fd28a52f
commit 8138cffb25
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ secret_seed = getpass.getpass("Enter passphrase: ").rstrip()
salted_secret_seed = hostname + secret_seed salted_secret_seed = hostname + secret_seed
salted_hash_value = hashlib.sha512(salted_secret_seed.encode()) salted_hash_value = hashlib.sha512(salted_secret_seed.encode())
with open("backup.conf", "w") as f: with open("/etc/backup.conf", "w") as f:
f.write(f"export BORG_REPO='ssh://{hostname}@{server_hostname}.162536.xyz:22/~/backup/docker'\n") f.write(f"export BORG_REPO='ssh://{hostname}@{server_hostname}.162536.xyz:22/~/backup/docker'\n")
f.write(f"export BORG_PASSPHRASE='{salted_hash_value.hexdigest()}'\n") f.write(f"export BORG_PASSPHRASE='{salted_hash_value.hexdigest()}'\n")