mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
security: Use drop-in config component for /etc files
Tests: - Config files are all symlinks in /etc/ - 'fail2ban-client get logtarget' shows sysout - fail2ban logs to journald - fail2ban identifies failures logged by apache in journald Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
500cfca6d4
commit
31cfb8f643
2
debian/freedombox.maintscript
vendored
2
debian/freedombox.maintscript
vendored
@ -129,3 +129,5 @@ rm_conffile /etc/fail2ban/jail.d/roundcube-auth-freedombox.conf 23.10~
|
||||
rm_conffile /etc/apache2/conf-available/rss-bridge.conf 23.10~
|
||||
rm_conffile /etc/apache2/conf-available/searx-freedombox-auth.conf 23.10~
|
||||
rm_conffile /etc/apache2/conf-available/searx-freedombox.conf 23.10~
|
||||
rm_conffile /etc/fail2ban/fail2ban.d/freedombox.conf 23.10~
|
||||
rm_conffile /etc/fail2ban/jail.d/freedombox.conf 23.10~
|
||||
|
||||
@ -9,6 +9,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from plinth import app as app_module
|
||||
from plinth import menu
|
||||
from plinth.config import DropinConfigs
|
||||
from plinth.daemon import Daemon, RelatedDaemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.package import Packages
|
||||
@ -22,7 +23,7 @@ class SecurityApp(app_module.App):
|
||||
|
||||
app_id = 'security'
|
||||
|
||||
_version = 8
|
||||
_version = 9
|
||||
|
||||
can_be_disabled = False
|
||||
|
||||
@ -42,6 +43,12 @@ class SecurityApp(app_module.App):
|
||||
packages = Packages('packages-security', ['fail2ban', 'debsecan'])
|
||||
self.add(packages)
|
||||
|
||||
dropin_configs = DropinConfigs('dropin-configs-security', [
|
||||
'/etc/fail2ban/fail2ban.d/freedombox.conf',
|
||||
'/etc/fail2ban/jail.d/freedombox.conf',
|
||||
])
|
||||
self.add(dropin_configs)
|
||||
|
||||
daemon = RelatedDaemon('related-daemon-fail2ban', 'fail2ban')
|
||||
self.add(daemon)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user