diff --git a/pleskdistup/actions/systemd.py b/pleskdistup/actions/systemd.py index 9509750..eb930e6 100644 --- a/pleskdistup/actions/systemd.py +++ b/pleskdistup/actions/systemd.py @@ -91,7 +91,6 @@ def __init__(self) -> None: "httpd.service", "mailman.service", "mariadb.service", - "mysqld.service", "named-chroot.service", "plesk-ext-monitoring-hcd.service", "plesk-ssh-terminal.service", @@ -111,6 +110,11 @@ def __init__(self) -> None: "plesk-ip-remapping.service", ] + # Once MariaDB has started, systemctl will not be able to control mysqld as a linked unit. + # Therefore, we should manage mysqld separately and only if MariaDB is not present + if "mariadb.service" not in self.plesk_systemd_services and systemd.is_service_startable("mysqld.service"): + self.plesk_systemd_services.append("mysqld.service") + # We don't remove postfix service when remove it during qmail installation # so we should choose the right smtp service, otherwise they will conflict if systemd.is_service_startable("qmail.service"):