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

+9 -3
View File
@@ -10,12 +10,13 @@ from plinth import app as app_module
from plinth import cfg, frontpage, menu
from plinth.daemon import Daemon
from plinth.modules.apache.components import Webserver
from plinth.modules.backups.components import BackupRestore
from plinth.modules.firewall.components import Firewall
from plinth.modules.users.components import UsersAndGroups
from plinth.modules.users import add_user_to_share_group
from plinth.modules.users.components import UsersAndGroups
from plinth.utils import format_lazy
from .manifest import backup, clients # noqa, pylint: disable=unused-import
from . import manifest
version = 3
@@ -59,7 +60,8 @@ class SyncthingApp(app_module.App):
name=_('Syncthing'), icon_filename='syncthing',
short_description=_('File Synchronization'),
description=_description,
manual_page='Syncthing', clients=clients,
manual_page='Syncthing',
clients=manifest.clients,
donation_url='https://syncthing.net/donations/')
self.add(info)
@@ -95,6 +97,10 @@ class SyncthingApp(app_module.App):
[SYSTEM_USER], self.groups)
self.add(users_and_groups)
backup_restore = BackupRestore('backup-restore-syncthing',
**manifest.backup)
self.add(backup_restore)
def setup(helper, old_version=None):
"""Install and configure the module."""
+2 -3
View File
@@ -3,7 +3,6 @@
from django.utils.translation import ugettext_lazy as _
from plinth.clients import store_url, validate
from plinth.modules.backups.api import validate as validate_backup
_package_id = 'com.nutomic.syncthingandroid'
_download_url = 'https://syncthing.net/'
@@ -47,9 +46,9 @@ clients = validate([{
}]
}])
backup = validate_backup({
backup = {
'secrets': {
'directories': ['/var/lib/syncthing/.config']
},
'services': ['syncthing@syncthing']
})
}