[systemd-devel] systemd dbus signal failure

Patrik Laszlo alabard at gmail.com
Wed Mar 1 07:41:05 UTC 2017


*Hello.*

*I am writing a systemd notifier via signals.*

*It works when i stop/start/restart a service. **
*

*The problems starts, when in 5 seconds later I trigger en error:*

Mar 01 08:37:43 server webhook[2299]: Webhook listening on port 23500!
Mar 01 08:37:48 server webhook[2299]: /root/server-scripts/webhook:26
Mar 01 08:37:48 server webhook[2299]:     asdasd
Mar 01 08:37:48 server webhook[2299]:     ^
Mar 01 08:37:48 server webhook[2299]: ReferenceError: asdasd is not defined
Mar 01 08:37:48 server webhook[2299]:     at Timeout.setTimeout [as 
_onTimeout] (/root/server-scripts/webhook:26:5)
Mar 01 08:37:48 server webhook[2299]:     at ontimeout (timers.js:365:14)
Mar 01 08:37:48 server webhook[2299]:     at tryOnTimeout (timers.js:237:5)
Mar 01 08:37:48 server webhook[2299]:     at Timer.listOnTimeout 
(timers.js:207:5)
Mar 01 08:37:48 server systemd[1]: p3x-webhook.service: Main process 
exited, code=exited, status=1/FAILURE
Mar 01 08:37:48 server systemd[1]: p3x-webhook.service: Unit entered 
failed state.
Mar 01 08:37:48 server systemd[1]: p3x-webhook.service: Failed with 
result 'exit-code'.

*I catch all events:*

   UnitNew: 'UnitNew',
             UnitRemoved: 'UnitRemoved',
             JobNew: 'JobNew',
             JobRemoved: 'JobRemoved',
             StartupFinished: 'StartupFinished',
             UnitFilesChanged: 'UnitFilesChanged',
             Reloading: 'Reloading'*,*

*
**The question, how can I receive a signal when a service goes into a 
failed state or any other triggered exit code?*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170301/3b6cd3c4/attachment.html>


More information about the systemd-devel mailing list