Skip to content

Commit

Permalink
Work with postfix systemd service only if it exists
Browse files Browse the repository at this point in the history
Actually we could remove all SMTP servers from plesk instance
by plesk installer. Or don't even install any at all.
So we should not interact with postfix service, therwise systemctl will fail
  • Loading branch information
Mikhail Sandakov committed Feb 22, 2024
1 parent f47d5d0 commit 1e00883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pleskdistup/actions/systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self):
# so we should choose the right smtp service, otherwise they will conflict
if systemd.is_service_exists("qmail.service"):
self.plesk_systemd_services.append("qmail.service")
else:
elif systemd.is_service_exists("postfix.service"):
self.plesk_systemd_services.append("postfix.service")

def _prepare_action(self) -> action.ActionResult:
Expand Down

0 comments on commit 1e00883

Please sign in to comment.