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

+5 -1
View File
@@ -13,9 +13,10 @@ from plinth import actions
from plinth import app as app_module
from plinth import menu
from plinth.daemon import Daemon
from plinth.modules.backups.components import BackupRestore
from plinth.modules.firewall.components import Firewall
from .manifest import backup # noqa, pylint: disable=unused-import
from . import manifest
version = 1
@@ -60,6 +61,9 @@ class SSHApp(app_module.App):
daemon = Daemon('daemon-ssh', managed_services[0])
self.add(daemon)
backup_restore = BackupRestore('backup-restore-ssh', **manifest.backup)
self.add(backup_restore)
def setup(helper, old_version=None):
"""Configure the module."""
+2 -4
View File
@@ -3,9 +3,7 @@
Application manifest for ssh.
"""
from plinth.modules.backups.api import validate as validate_backup
backup = validate_backup({
backup = {
'secrets': {
'files': [
'/etc/ssh/ssh_host_ecdsa_key', '/etc/ssh/ssh_host_ecdsa_key.pub',
@@ -14,4 +12,4 @@ backup = validate_backup({
'/etc/ssh/ssh_host_rsa_key.pub'
]
}
})
}