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

Tests:

- Config files are all symlinks in /etc/
- Creating blog and wiki works
- Wiki is accessible

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 11:44:54 -07:00 committed by James Valleroy
parent 4950639fbf
commit 6688ec9a20
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
5 changed files with 12 additions and 1 deletions

View File

@ -109,3 +109,6 @@ rm_conffile /etc/gitweb-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/gitweb-freedombox.conf 23.10~ rm_conffile /etc/apache2/conf-available/gitweb-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/gitweb-freedombox-auth.conf 23.10~ rm_conffile /etc/apache2/conf-available/gitweb-freedombox-auth.conf 23.10~
rm_conffile /etc/apache2/conf-available/i2p-freedombox.conf 23.10~ rm_conffile /etc/apache2/conf-available/i2p-freedombox.conf 23.10~
rm_conffile /etc/ikiwiki/plinth-blog.setup 23.10~
rm_conffile /etc/ikiwiki/plinth-wiki.setup 23.10~
rm_conffile /etc/apache2/conf-available/ikiwiki-plinth.conf 23.10~

View File

@ -6,6 +6,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.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
from plinth.modules.firewall.components import Firewall from plinth.modules.firewall.components import Firewall
@ -34,7 +35,7 @@ class IkiwikiApp(app_module.App):
app_id = 'ikiwiki' app_id = 'ikiwiki'
_version = 1 _version = 2
def __init__(self): def __init__(self):
"""Create components for the app.""" """Create components for the app."""
@ -61,6 +62,13 @@ class IkiwikiApp(app_module.App):
]) ])
self.add(packages) self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-ikiwiki', [
'/etc/ikiwiki/plinth-blog.setup',
'/etc/ikiwiki/plinth-wiki.setup',
'/etc/apache2/conf-available/ikiwiki-plinth.conf',
])
self.add(dropin_configs)
firewall = Firewall('firewall-ikiwiki', info.name, firewall = Firewall('firewall-ikiwiki', info.name,
ports=['http', 'https'], is_external=True) ports=['http', 'https'], is_external=True)
self.add(firewall) self.add(firewall)