backups: Use the backup component in all apps

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa authored and Veiko Aasa committed 2021-01-04 13:47:38 +02:00
1 parent f630fb6059
commit fb1898befc
105 files changed
+748 -644

No files matched your search

+6 -1
View File
@@ -10,9 +10,10 @@ from django.utils.translation import ugettext_lazy as _
from plinth import actions
from plinth import app as app_module
from plinth import cfg, menu
from plinth.modules.backups.components import BackupRestore
from plinth.utils import format_lazy
from .manifest import backup # noqa, pylint: disable=unused-import
from . import manifest
version = 1
@@ -44,6 +45,10 @@ class SharingApp(app_module.App):
parent_url_name='apps')
self.add(menu_item)
backup_restore = BackupRestore('backup-restore-sharing',
**manifest.backup)
self.add(backup_restore)
def list_shares():
"""Return a list of shares."""
+2 -4
View File
@@ -3,9 +3,7 @@
Application manifest for sharing.
"""
from plinth.modules.backups.api import validate as validate_backup
backup = validate_backup({
backup = {
'config': {
'files': ['/etc/apache2/conf-available/sharing-freedombox.conf']
},
@@ -14,4 +12,4 @@ backup = validate_backup({
'kind': 'config',
'name': 'sharing-freedombox'
}]
})
}