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 2023-05-16 14:02:30 -07:00 committed by James Valleroy
parent 87a45e1716
commit a35c320ebd
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
4 changed files with 14 additions and 1 deletions

View File

@ -94,6 +94,8 @@ rm_conffile /etc/uwsgi/apps-available/bepasty-freedombox.ini 23.10~
rm_conffile /etc/apache2/conf-available/calibre-freedombox.conf 23.10~ rm_conffile /etc/apache2/conf-available/calibre-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/cockpit-freedombox.conf 23.10~ rm_conffile /etc/apache2/conf-available/cockpit-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/deluge-plinth.conf 23.10~ rm_conffile /etc/apache2/conf-available/deluge-plinth.conf 23.10~
rm_conffile /etc/apache2/conf-available/jwchat-plinth.conf 23.10~
rm_conffile /etc/avahi/services/xmpp-server.service 23.10~
rm_conffile /etc/dovecot/conf.d/15-freedombox-mail.conf 23.10~ rm_conffile /etc/dovecot/conf.d/15-freedombox-mail.conf 23.10~
rm_conffile /etc/dovecot/conf.d/05-freedombox-passdb.conf 23.10~ rm_conffile /etc/dovecot/conf.d/05-freedombox-passdb.conf 23.10~
rm_conffile /etc/dovecot/conf.d/95-freedombox-sieve.conf 23.10~ rm_conffile /etc/dovecot/conf.d/95-freedombox-sieve.conf 23.10~

View File

@ -10,6 +10,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 import config from plinth.modules import config
from plinth.modules.apache.components import Webserver from plinth.modules.apache.components import Webserver
@ -50,7 +51,7 @@ class EjabberdApp(app_module.App):
app_id = 'ejabberd' app_id = 'ejabberd'
_version = 6 _version = 7
def __init__(self): def __init__(self):
"""Create components for the app.""" """Create components for the app."""
@ -79,6 +80,16 @@ class EjabberdApp(app_module.App):
packages = Packages('packages-ejabberd', ['ejabberd']) packages = Packages('packages-ejabberd', ['ejabberd'])
self.add(packages) 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, firewall = Firewall('firewall-ejabberd', info.name,
ports=['xmpp-client', 'xmpp-server', ports=['xmpp-client', 'xmpp-server',
'xmpp-bosh'], is_external=True) 'xmpp-bosh'], is_external=True)