mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
miniflux: Add management of postgresql daemon in a shared manner
- This allows miniflux to disabled postgresql if it is not needed by any other app and enable postgresql if it is disabled and miniflux is being enabled. Tests: - When disabling miniflux and it is the last app using postgresql, it will be disabled too. - When disabling miniflux and it is not the last app using postgresql, it will not be disabled too. - When enabling miniflux if postgresql is disabled, it will be enabled too. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
ea134d5777
commit
763b555e83
@ -6,7 +6,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
from plinth import app as app_module
|
||||
from plinth import frontpage, menu
|
||||
from plinth.config import DropinConfigs
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.daemon import Daemon, SharedDaemon
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
@ -74,6 +74,10 @@ class MinifluxApp(app_module.App):
|
||||
urls=['https://{host}/miniflux/'])
|
||||
self.add(webserver)
|
||||
|
||||
daemon = SharedDaemon('shared-daemon-miniflus-postgresql',
|
||||
'postgresql')
|
||||
self.add(daemon)
|
||||
|
||||
daemon = Daemon('daemon-miniflux', 'miniflux',
|
||||
listen_ports=[(8788, 'tcp4'), (8788, 'tcp6')])
|
||||
self.add(daemon)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user