Add note message type and improve messages
This commit is contained in:
@ -248,7 +248,7 @@ def entrypoint():
|
||||
print("|----------------------------------------------------------|")
|
||||
print("")
|
||||
|
||||
notifications.send_webhook(config, "begin", "Starting up pvcbootstrapd")
|
||||
notifications.send_webhook(config, "info", "Initializing pvcbootstrapd")
|
||||
|
||||
# Initialize the database
|
||||
db.init_database(config)
|
||||
@ -261,7 +261,7 @@ def entrypoint():
|
||||
|
||||
if "--init-only" in argv:
|
||||
print("Successfully initialized pvcbootstrapd; exiting.")
|
||||
notifications.send_webhook(config, "success", "Successfully initialized pvcbootstrapd")
|
||||
notifications.send_webhook(config, "info", "Successfully initialized pvcbootstrapd")
|
||||
exit(0)
|
||||
|
||||
# Start DNSMasq
|
||||
@ -274,14 +274,14 @@ def entrypoint():
|
||||
|
||||
def term(signum="", frame=""):
|
||||
print("Received TERM, exiting.")
|
||||
notifications.send_webhook(config, "completed", "Received TERM, exiting pvcbootstrapd")
|
||||
notifications.send_webhook(config, "info", "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")
|
||||
notifications.send_webhook(config, "info", "Starting up pvcbootstrapd")
|
||||
|
||||
# Start Flask
|
||||
pvcbootstrapd.app.run(
|
||||
|
Reference in New Issue
Block a user