mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 01:05:20 +03:00
Improve restart from UI
This commit is contained in:
parent
be04b69bae
commit
69faec89d7
@ -524,7 +524,7 @@ def restart_frigate(mqtt_client, topic_prefix, from_ui = 1):
|
||||
def on_publish(client,userdata,result):
|
||||
time.sleep(0.67)
|
||||
logger.info("Restart requested.")
|
||||
os.kill(os.getpid(), signal.SIGTERM)
|
||||
os.kill(os.getpid(), signal.SIGKILL)
|
||||
|
||||
mqtt_client.on_publish = on_publish
|
||||
mqtt_client.publish(f"{topic_prefix}/restarted", int(from_ui))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user