[systemd-devel] systemd-notify --ready is not reliable

Lennart Poettering lennart at poettering.net
Mon Jul 7 08:30:38 PDT 2014


On Mon, 07.07.14 09:51, pradip K (pskothali at gmail.com) wrote:

> Hi Eelco,

Please dont hijack threads, open your own.

> I am trying implement watchdog feature using sd_notify, could you pls give
> us more details on setting $NOTIFY_SOCKET.
> Like how to create socket and assign to environment NOTIFY_SOCKET for this 
> 
> 
> [Unit]
> After=snmpd.service
> Before=exxxl.service nxx.service ixx.service lac

                                               ^^^^^this is not a valid unit name
> 
> [Service]
> Type=notify
> ExecStart=/data/ABC -d
> ExecStop=/data/pkill ABC
> TimeoutStopSec=5
> Environment=NOTIFY_SOCKET=

Dont do this, NOTIFY_SOCKET is implicitly set because you already set Type=notify.

> WatchdogSec=30s
> NotifyAccess=all
> FailureAction==reboot-force

Use a single "=" only.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list