<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><b>Hello.</b></p>
<p><b>I am writing a systemd notifier via signals.</b></p>
<p><b>It works when i stop/start/restart a service. </b><b><br>
</b></p>
<p><b>The problems starts, when in 5 seconds later I trigger en
error:</b></p>
<p>Mar 01 08:37:43 server webhook[2299]: Webhook listening on port
23500!<br>
Mar 01 08:37:48 server webhook[2299]:
/root/server-scripts/webhook:26<br>
Mar 01 08:37:48 server webhook[2299]: asdasd<br>
Mar 01 08:37:48 server webhook[2299]: ^<br>
Mar 01 08:37:48 server webhook[2299]: ReferenceError: asdasd is
not defined<br>
Mar 01 08:37:48 server webhook[2299]: at Timeout.setTimeout
[as _onTimeout] (/root/server-scripts/webhook:26:5)<br>
Mar 01 08:37:48 server webhook[2299]: at ontimeout
(timers.js:365:14)<br>
Mar 01 08:37:48 server webhook[2299]: at tryOnTimeout
(timers.js:237:5)<br>
Mar 01 08:37:48 server webhook[2299]: at Timer.listOnTimeout
(timers.js:207:5)<br>
Mar 01 08:37:48 server systemd[1]: p3x-webhook.service: Main
process exited, code=exited, status=1/FAILURE<br>
Mar 01 08:37:48 server systemd[1]: p3x-webhook.service: Unit
entered failed state.<br>
Mar 01 08:37:48 server systemd[1]: p3x-webhook.service: Failed
with result 'exit-code'.</p>
<p><b>I catch all events:</b></p>
<p> UnitNew: 'UnitNew',<br>
UnitRemoved: 'UnitRemoved',<br>
JobNew: 'JobNew',<br>
JobRemoved: 'JobRemoved',<br>
StartupFinished: 'StartupFinished',<br>
UnitFilesChanged: 'UnitFilesChanged',<br>
Reloading: 'Reloading'<b>,</b></p>
<p><b><br>
</b><b>The question, how can I receive a signal when a service
goes into a failed state or any other triggered exit code?</b><br>
</p>
</body>
</html>