Forum > Linux

sd_notify for systemd watchdog

(1/1)

TheMouseAUS:
How can I easily call sd_notify (specifically watchdog=1) from a command line app I have created. I am wanting systemd to restart the app if the watchdog stops  responding for some reason. Thanks in advance :-)

dsiders:

--- Quote from: TheMouseAUS on December 29, 2024, 01:59:12 am ---How can I easily call sd_notify (specifically watchdog=1) from a command line app I have created. I am wanting systemd to restart the app if the watchdog stops  responding for some reason. Thanks in advance :-)

--- End quote ---

systemd-notify --help

Might need sudo.

TheMouseAUS:
so i run it as an external app?

dsiders:

--- Quote from: TheMouseAUS on December 29, 2024, 03:03:00 am ---so i run it as an external app?

--- End quote ---

You can use TProcess to run it. I'm not aware of na FPC interface to the library code... but there's a lot I don't know. :)

Navigation

[0] Message Index

Go to full version