From 2674f3360c8eaeb25704ee07f3c276ee8328f155 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 6 Jul 2022 17:49:24 +0000 Subject: [PATCH] Add additional notifications to Daemon.py --- bootstrap-daemon/pvcbootstrapd/Daemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap-daemon/pvcbootstrapd/Daemon.py b/bootstrap-daemon/pvcbootstrapd/Daemon.py index 36ab5f8..6a70769 100755 --- a/bootstrap-daemon/pvcbootstrapd/Daemon.py +++ b/bootstrap-daemon/pvcbootstrapd/Daemon.py @@ -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"],