diff --git a/plinth/modules/apache/__init__.py b/plinth/modules/apache/__init__.py index 2de1bcddc..b9ab3c0f4 100644 --- a/plinth/modules/apache/__init__.py +++ b/plinth/modules/apache/__init__.py @@ -69,7 +69,7 @@ from plinth import action_utils from plinth import app as app_module from plinth import cfg from plinth.config import DropinConfigs -from plinth.daemon import Daemon, RelatedDaemon +from plinth.daemon import Daemon from plinth.modules import names from plinth.modules.firewall.components import Firewall from plinth.modules.letsencrypt.components import LetsEncrypt @@ -96,10 +96,9 @@ class ApacheApp(app_module.App): is_essential=True, name=_('Apache HTTP Server')) self.add(info) - packages = Packages('packages-apache', [ - 'apache2', 'php-fpm', 'ssl-cert', 'uwsgi-core', - 'uwsgi-plugin-python3', 'libapache2-mod-auth-openidc' - ]) + packages = Packages( + 'packages-apache', + ['apache2', 'php-fpm', 'ssl-cert', 'libapache2-mod-auth-openidc']) self.add(packages) dropin_configs = DropinConfigs('dropin-configs-apache', [ @@ -134,10 +133,6 @@ class ApacheApp(app_module.App): daemon = Daemon('daemon-apache', 'apache2') self.add(daemon) - # To be able to disable the old uwsgi init.d script. - related_daemon = RelatedDaemon('related-daemon-apache', 'uwsgi') - self.add(related_daemon) - @staticmethod def post_init(): """Perform post initialization operations.""" diff --git a/plinth/modules/backups/components.py b/plinth/modules/backups/components.py index 4a8e020b7..e06a6a012 100644 --- a/plinth/modules/backups/components.py +++ b/plinth/modules/backups/components.py @@ -42,7 +42,7 @@ def _validate_service(service): """Validate a service manifest provided as a dictionary.""" assert isinstance(service['name'], str) assert isinstance(service['type'], str) - assert service['type'] in ('apache', 'uwsgi', 'system') + assert service['type'] in ('apache', 'system') if service['type'] == 'apache': assert service['kind'] in ('config', 'site', 'module') diff --git a/plinth/modules/backups/tests/test_components.py b/plinth/modules/backups/tests/test_components.py index a42829443..1772f0f38 100644 --- a/plinth/modules/backups/tests/test_components.py +++ b/plinth/modules/backups/tests/test_components.py @@ -87,10 +87,6 @@ def test_invalid_directories_and_files(section): None, [], ['service'], - [{ - 'type': 'uwsgi', - 'name': 'service' - }], [{ 'type': 'system', 'name': 'service' diff --git a/plinth/modules/bepasty/__init__.py b/plinth/modules/bepasty/__init__.py index 6d0fa5781..ea814ab1b 100644 --- a/plinth/modules/bepasty/__init__.py +++ b/plinth/modules/bepasty/__init__.py @@ -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, RelatedDaemon from plinth.modules.apache.components import Webserver from plinth.modules.backups.components import BackupRestore from plinth.modules.firewall.components import Firewall @@ -50,7 +50,7 @@ class BepastyApp(app_module.App): app_id = 'bepasty' - _version = 4 + _version = 5 def __init__(self) -> None: """Create components for the app.""" @@ -72,7 +72,8 @@ class BepastyApp(app_module.App): clients=manifest.clients, tags=info.tags) self.add(shortcut) - packages = Packages('packages-bepasty', ['bepasty']) + packages = Packages('packages-bepasty', + ['bepasty', 'uwsgi', 'uwsgi-plugin-python3']) self.add(packages) dropin_configs = DropinConfigs('dropin-configs-bepasty', [ @@ -97,6 +98,10 @@ class BepastyApp(app_module.App): **manifest.backup) self.add(backup_restore) + # To be able to disable the old uwsgi init.d script. + related_daemon = RelatedDaemon('related-daemon-bepasty', 'uwsgi') + self.add(related_daemon) + def setup(self, old_version): """Install and configure the app.""" super().setup(old_version) diff --git a/plinth/modules/radicale/__init__.py b/plinth/modules/radicale/__init__.py index 7eab78db5..f21f4bdaf 100644 --- a/plinth/modules/radicale/__init__.py +++ b/plinth/modules/radicale/__init__.py @@ -10,7 +10,7 @@ from django.utils.translation import gettext_lazy as _ from plinth import app as app_module from plinth import cfg, frontpage, menu from plinth.config import DropinConfigs -from plinth.daemon import Daemon +from plinth.daemon import Daemon, RelatedDaemon from plinth.modules.apache.components import Webserver from plinth.modules.backups.components import BackupRestore from plinth.modules.firewall.components import Firewall @@ -42,7 +42,7 @@ class RadicaleApp(app_module.App): app_id = 'radicale' - _version = 6 + _version = 7 def __init__(self) -> None: """Create components for the app.""" @@ -66,7 +66,8 @@ class RadicaleApp(app_module.App): tags=info.tags, login_required=True) self.add(shortcut) - packages = Packages('packages-radicale', ['radicale'], + packages = Packages('packages-radicale', + ['radicale', 'uwsgi', 'uwsgi-plugin-python3'], rerun_setup_on_upgrade=True) self.add(packages) @@ -94,6 +95,10 @@ class RadicaleApp(app_module.App): **manifest.backup) self.add(backup_restore) + # To be able to disable the old uwsgi init.d script. + related_daemon = RelatedDaemon('related-daemon-radicale', 'uwsgi') + self.add(related_daemon) + def enable(self): """Fix missing directories before enabling radicale.""" privileged.fix_paths() diff --git a/plinth/modules/searx/__init__.py b/plinth/modules/searx/__init__.py index 7b13e67ef..e81e0ade9 100644 --- a/plinth/modules/searx/__init__.py +++ b/plinth/modules/searx/__init__.py @@ -8,7 +8,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, RelatedDaemon from plinth.modules.apache.components import Webserver from plinth.modules.backups.components import BackupRestore from plinth.modules.firewall.components import Firewall @@ -31,7 +31,7 @@ class SearxApp(app_module.App): app_id = 'searx' - _version = 7 + _version = 8 def __init__(self) -> None: """Create components for the app.""" @@ -59,7 +59,9 @@ class SearxApp(app_module.App): # Include libjs-bootstrap to prevent accidental uninstall (see # issue #2298). - packages = Packages('packages-searx', ['searx', 'libjs-bootstrap']) + packages = Packages( + 'packages-searx', + ['searx', 'libjs-bootstrap', 'uwsgi', 'uwsgi-plugin-python3']) self.add(packages) dropin_configs = DropinConfigs('dropin-configs-searx', [ @@ -91,6 +93,10 @@ class SearxApp(app_module.App): **manifest.backup) self.add(backup_restore) + # To be able to disable the old uwsgi init.d script. + related_daemon = RelatedDaemon('related-daemon-searx', 'uwsgi') + self.add(related_daemon) + def set_shortcut_login_required(self, login_required): """Change the login_required property of shortcut.""" self.get_component('shortcut-searx').login_required = login_required