mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
backups: Implement disabling web configuration during backup
- Introduce a BackupApp class to store all information about application being backed up. This cleans up apps lists vs. manifest lists spread out in the code. - Introduce ServiceHandler to abstract dealing with services and web configuration. - Add enable and disable actions in apache action. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
5ee0f71e62
commit
b18a80f0f2
6 files changed
+279
-166
No files matched your search
@@ -86,10 +86,10 @@ def _backup_handler(packet):
|
||||
manifest_path = os.path.join(MANIFESTS_FOLDER,
|
||||
get_valid_filename(packet.label) + '.json')
|
||||
manifests = [{
|
||||
'name': manifest[0],
|
||||
'version': manifest[1].version,
|
||||
'backup': manifest[2]
|
||||
} for manifest in packet.manifests]
|
||||
'name': app.name,
|
||||
'version': app.app.version,
|
||||
'backup': app.manifest
|
||||
} for app in packet.apps]
|
||||
with open(manifest_path, 'w') as manifest_file:
|
||||
json.dump(manifests, manifest_file)
|
||||
|
||||
|
||||
Reference in new issue
Block a user