syncthing: Use drop-in config component for /etc files

Tests:

- Config files are all symlinks in /etc/
- Web interface works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-05-16 13:43:39 -07:00 committed by James Valleroy
parent f3bad4a880
commit 3d299a7b8a
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 8 additions and 1 deletions

View File

@ -136,3 +136,4 @@ rm_conffile /etc/fail2ban/jail.d/ssh-freedombox.conf 23.10~
rm_conffile /etc/avahi/services/sftp-ssh.service 23.10~ rm_conffile /etc/avahi/services/sftp-ssh.service 23.10~
rm_conffile /etc/avahi/services/ssh.service 23.10~ rm_conffile /etc/avahi/services/ssh.service 23.10~
rm_conffile /etc/apache2/includes/freedombox-single-sign-on.conf 23.10~ rm_conffile /etc/apache2/includes/freedombox-single-sign-on.conf 23.10~
rm_conffile /etc/apache2/conf-available/syncthing-plinth.conf 23.10~

View File

@ -5,6 +5,7 @@ from django.utils.translation import gettext_lazy as _
from plinth import app as app_module from plinth import app as app_module
from plinth import cfg, frontpage, menu from plinth import cfg, frontpage, menu
from plinth.config import DropinConfigs
from plinth.daemon import Daemon from plinth.daemon import Daemon
from plinth.modules.apache.components import Webserver from plinth.modules.apache.components import Webserver
from plinth.modules.backups.components import BackupRestore from plinth.modules.backups.components import BackupRestore
@ -42,7 +43,7 @@ class SyncthingApp(app_module.App):
app_id = 'syncthing' app_id = 'syncthing'
_version = 6 _version = 7
DAEMON = 'syncthing@syncthing' DAEMON = 'syncthing@syncthing'
@ -79,6 +80,11 @@ class SyncthingApp(app_module.App):
packages = Packages('packages-syncthing', ['syncthing']) packages = Packages('packages-syncthing', ['syncthing'])
self.add(packages) self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-syncthing', [
'/etc/apache2/conf-available/syncthing-plinth.conf',
])
self.add(dropin_configs)
firewall = Firewall('firewall-syncthing-web', info.name, firewall = Firewall('firewall-syncthing-web', info.name,
ports=['http', 'https'], is_external=True) ports=['http', 'https'], is_external=True)
self.add(firewall) self.add(firewall)