mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
certificate: don't attempt to restart metronome if not installed
This commit is contained in:
parent
beadea5305
commit
b63136da52
1 changed files with 3 additions and 0 deletions
|
@ -792,6 +792,9 @@ def _enable_certificate(domain, new_cert_folder):
|
||||||
logger.debug("Restarting services...")
|
logger.debug("Restarting services...")
|
||||||
|
|
||||||
for service in ("postfix", "dovecot", "metronome"):
|
for service in ("postfix", "dovecot", "metronome"):
|
||||||
|
# Ugly trick to not restart metronome if it's not installed
|
||||||
|
if service == "metronome" and os.system("dpkg --list | grep -q 'ii *metronome'") != 0:
|
||||||
|
continue
|
||||||
_run_service_command("restart", service)
|
_run_service_command("restart", service)
|
||||||
|
|
||||||
if os.path.isfile("/etc/yunohost/installed"):
|
if os.path.isfile("/etc/yunohost/installed"):
|
||||||
|
|
Loading…
Add table
Reference in a new issue