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

Tests:

- Config files are all symlinks in /etc/
- bepasty uwsgi service is running
- bepasty web interface is available

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:56:45 -07:00 committed by James Valleroy
parent c6817ab462
commit 1060d733a7
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
4 changed files with 10 additions and 1 deletions

View File

@ -89,6 +89,8 @@ rm_conffile /etc/plinth/modules-enabled/wordpress 23.10~
rm_conffile /etc/plinth/modules-enabled/zoph 23.10~ rm_conffile /etc/plinth/modules-enabled/zoph 23.10~
rm_conffile /etc/apache2/conf-available/php-fpm-freedombox.conf 23.10~ rm_conffile /etc/apache2/conf-available/php-fpm-freedombox.conf 23.10~
rm_conffile /etc/fail2ban/jail.d/apache-auth-freedombox.conf 23.10~ rm_conffile /etc/fail2ban/jail.d/apache-auth-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/bepasty-freedombox.conf 23.10~
rm_conffile /etc/uwsgi/apps-available/bepasty-freedombox.ini 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/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~

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 frontpage, menu from plinth import frontpage, menu
from plinth.config import DropinConfigs
from plinth.modules.apache.components import Uwsgi, Webserver from plinth.modules.apache.components import Uwsgi, Webserver
from plinth.modules.backups.components import BackupRestore from plinth.modules.backups.components import BackupRestore
from plinth.modules.firewall.components import Firewall from plinth.modules.firewall.components import Firewall
@ -47,7 +48,7 @@ class BepastyApp(app_module.App):
app_id = 'bepasty' app_id = 'bepasty'
_version = 2 _version = 3
def __init__(self): def __init__(self):
"""Create components for the app.""" """Create components for the app."""
@ -74,6 +75,12 @@ class BepastyApp(app_module.App):
packages = Packages('packages-bepasty', ['bepasty']) packages = Packages('packages-bepasty', ['bepasty'])
self.add(packages) self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-bepasty', [
'/etc/apache2/conf-available/bepasty-freedombox.conf',
'/etc/uwsgi/apps-available/bepasty-freedombox.ini'
])
self.add(dropin_configs)
firewall = Firewall('firewall-bepasty', info.name, firewall = Firewall('firewall-bepasty', info.name,
ports=['http', 'https'], is_external=True) ports=['http', 'https'], is_external=True)
self.add(firewall) self.add(firewall)