mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +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:
|
try:
|
||||||
subprocess.run(['borg', 'info', REPOSITORY], check=True)
|
subprocess.run(['borg', 'info', REPOSITORY], check=True)
|
||||||
except:
|
except:
|
||||||
|
path = os.path.dirname(REPOSITORY)
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
|
|
||||||
subprocess.run(['borg', 'init', '--encryption', 'none', REPOSITORY])
|
subprocess.run(['borg', 'init', '--encryption', 'none', REPOSITORY])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user