fix: stop prosody when jitsi stops

This commit is contained in:
nhnn 2024-08-09 11:17:27 +03:00
parent 4cd90d0c93
commit 1bfe7cf8dc

View file

@ -71,29 +71,32 @@ class JitsiMeet(Service):
@staticmethod @staticmethod
def get_status() -> ServiceStatus: def get_status() -> ServiceStatus:
return get_service_status_from_several_units( return get_service_status_from_several_units(
["jitsi-videobridge.service", "jicofo.service"] ["prosody.service", "jitsi-videobridge2.service", "jicofo.service"]
) )
@staticmethod @staticmethod
def stop(): def stop():
subprocess.run( subprocess.run(
["systemctl", "stop", "jitsi-videobridge.service"], ["systemctl", "stop", "jitsi-videobridge2.service"],
check=False, check=False,
) )
subprocess.run(["systemctl", "stop", "jicofo.service"], check=False) subprocess.run(["systemctl", "stop", "jicofo.service"], check=False)
subprocess.run(["systemctl", "stop", "prosody.service"], check=False)
@staticmethod @staticmethod
def start(): def start():
subprocess.run(["systemctl", "start", "prosody.service"], check=False)
subprocess.run( subprocess.run(
["systemctl", "start", "jitsi-videobridge.service"], ["systemctl", "start", "jitsi-videobridge2.service"],
check=False, check=False,
) )
subprocess.run(["systemctl", "start", "jicofo.service"], check=False) subprocess.run(["systemctl", "start", "jicofo.service"], check=False)
@staticmethod @staticmethod
def restart(): def restart():
subprocess.run(["systemctl", "restart", "prosody.service"], check=False)
subprocess.run( subprocess.run(
["systemctl", "restart", "jitsi-videobridge.service"], ["systemctl", "restart", "jitsi-videobridge2.service"],
check=False, check=False,
) )
subprocess.run(["systemctl", "restart", "jicofo.service"], check=False) subprocess.run(["systemctl", "restart", "jicofo.service"], check=False)