Add additional notifications to Daemon.py
This commit is contained in:
parent
d35e339801
commit
2674f3360c
|
@ -261,6 +261,7 @@ def entrypoint():
|
|||
|
||||
if "--init-only" in argv:
|
||||
print("Successfully initialized pvcbootstrapd; exiting.")
|
||||
notifications.send_webhook(config, "success", "Successfully initialized pvcbootstrapd")
|
||||
exit(0)
|
||||
|
||||
# Start DNSMasq
|
||||
|
@ -273,12 +274,15 @@ def entrypoint():
|
|||
|
||||
def term(signum="", frame=""):
|
||||
print("Received TERM, exiting.")
|
||||
notifications.send_webhook(config, "begin", "Received TERM, exiting pvcbootstrapd")
|
||||
cleanup(0)
|
||||
|
||||
signal.signal(signal.SIGTERM, term)
|
||||
signal.signal(signal.SIGINT, term)
|
||||
signal.signal(signal.SIGQUIT, term)
|
||||
|
||||
notifications.send_webhook(config, "success", "Started up pvcbootstrapd")
|
||||
|
||||
# Start Flask
|
||||
pvcbootstrapd.app.run(
|
||||
config["api_address"],
|
||||
|
|
Loading…
Reference in New Issue