mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
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:
1 parent
f630fb6059
commit
fb1898befc
105 files changed
+748
-644
No files matched your search
@@ -16,10 +16,11 @@ from plinth import app as app_module
|
||||
from plinth import 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.letsencrypt.components import LetsEncrypt
|
||||
|
||||
from .manifest import backup, clients # noqa, pylint: disable=unused-import
|
||||
from . import manifest
|
||||
|
||||
version = 6
|
||||
|
||||
@@ -63,12 +64,11 @@ class MatrixSynapseApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Matrix Synapse'),
|
||||
icon_filename='matrixsynapse',
|
||||
short_description=_('Chat Server'),
|
||||
description=_description,
|
||||
manual_page='MatrixSynapse', clients=clients)
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, name=_('Matrix Synapse'),
|
||||
icon_filename='matrixsynapse', short_description=_('Chat Server'),
|
||||
description=_description, manual_page='MatrixSynapse',
|
||||
clients=manifest.clients)
|
||||
self.add(info)
|
||||
|
||||
menu_item = menu.Menu('menu-matrixsynapse', info.name,
|
||||
@@ -106,6 +106,10 @@ class MatrixSynapseApp(app_module.App):
|
||||
listen_ports=[(8008, 'tcp4'), (8448, 'tcp4')])
|
||||
self.add(daemon)
|
||||
|
||||
backup_restore = BackupRestore('backup-restore-matrixsynapse',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
|
||||
@@ -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
|
||||
|
||||
_android_package_id = 'im.vector.app'
|
||||
_element_desktop_download_url = 'https://element.io/get-started'
|
||||
@@ -44,7 +43,7 @@ clients = validate([{
|
||||
}]
|
||||
}])
|
||||
|
||||
backup = validate_backup({
|
||||
backup = {
|
||||
'config': {
|
||||
'directories': ['/etc/matrix-synapse/conf.d/'],
|
||||
'files': [
|
||||
@@ -68,4 +67,4 @@ backup = validate_backup({
|
||||
]
|
||||
},
|
||||
'services': ['matrix-synapse']
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user