Commit 1e92bc1f authored by Jonathan Michalon's avatar Jonathan Michalon

Very simple and naive watchdog that alerts when the actual process quits

parent 3096e71b
......@@ -35,3 +35,5 @@ config.install_attr('emails.subject_tpl',
'[DOMAIN] {state}: {check} on {dest}')
# reports email subject
config.install_attr('emails.report.subject', '[DOMAIN] Picomon error report')
# watchdog error email subject
config.install_attr('emails.watchdog_subject', '[DOMAIN] Picomon stopped')
import subprocess
import config
from lib import mails
retcode = subprocess.call(["python3", "picomon.py"])
mails.send_email(config.emails.watchdog_subject,
"Picomon exited with status %s" % retcode)
mails.quit()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment