On Jul 7, 2014 1:20 PM, "pradip K" <pskoth...@gmail.com> wrote: > 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
The socket is created automatically by systemd; all you need to set is Type=notify and systemd will set the right variable. > [Unit] > After=snmpd.service > Before=exxxl.service nxx.service ixx.service lac > > [Service] > Type=notify > ExecStart=/data/ABC -d > ExecStop=/data/pkill ABC > TimeoutStopSec=5 > Environment=NOTIFY_SOCKET= > WatchdogSec=30s > NotifyAccess=all > FailureAction==reboot-force > > [Install] > WantedBy=multi-user.target (Also, please do not use `pkill` in ExecStop; it's not just unnecessary, it even makes the stop process *less* reliable. systemd already knows which PID it has to kill.) -- Mantas Mikulėnas <graw...@gmail.com> // sent from phone
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel