mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
backups: Create folder if needed during setup
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
188309fd91
commit
7817111928
@ -83,6 +83,10 @@ def subcommand_setup(_):
|
||||
try:
|
||||
subprocess.run(['borg', 'info', REPOSITORY], check=True)
|
||||
except:
|
||||
path = os.path.dirname(REPOSITORY)
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
||||
subprocess.run(['borg', 'init', '--encryption', 'none', REPOSITORY])
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user