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

Tests:

- Config files are all symlinks in /etc/

- jsxc is able to connect to jabber server

- When ssh is enabled avahi-browse -a shows SSH and SFTP services. The avahi
service files are created in /etc/avahi/services/. When service is disabled,
files are removed and avahi-browse -a does not show the services.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2023-06-05 20:30:16 -04:00
1 parent 87a45e1716
commit a35c320ebd
4 files changed
+14 -1

No files matched your search

+12 -1
View File
@@ -10,6 +10,7 @@ from django.utils.translation import gettext_lazy as _
from plinth import app as app_module
from plinth import cfg, frontpage, menu
from plinth.config import DropinConfigs
from plinth.daemon import Daemon
from plinth.modules import config
from plinth.modules.apache.components import Webserver
@@ -50,7 +51,7 @@ class EjabberdApp(app_module.App):
app_id = 'ejabberd'
_version = 6
_version = 7
def __init__(self):
"""Create components for the app."""
@@ -79,6 +80,16 @@ class EjabberdApp(app_module.App):
packages = Packages('packages-ejabberd', ['ejabberd'])
self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-ejabberd', [
'/etc/apache2/conf-available/jwchat-plinth.conf',
])
self.add(dropin_configs)
dropin_configs = DropinConfigs('dropin-config-ejabberd-avahi', [
'/etc/avahi/services/xmpp-server.service',
], copy_only=True)
self.add(dropin_configs)
firewall = Firewall('firewall-ejabberd', info.name,
ports=['xmpp-client', 'xmpp-server',
'xmpp-bosh'], is_external=True)