Hello all,

I have scripted a service unit as follow.

[Unit]
Description="A test service"
After=epmd.service epmd.socket

[Service]
ExecStart=/home/otpuser/bin/start
Type=notify
NotifyAccess=all
WorkingDirectory=~
User=otpuser
Group=otp
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target


ExecStart directs to a shell script which starts a Erlang run_erl daemon.
This daemon is forking a process which is the BEAM virtual machine. In the
forked process Im sending "READY=1\nSTATUS=Initialized\nMAINPID="
<<Forked-Process-Pid>> "\n to systemd via sd_notify. The problem is service
is getting restarted constantly.

journalctl give this

abc.service: Service hold-off time over, scheduling restart.
Stopped "A test service.".


Is it required to send READY=1 from the daemon it self ? or can systemd
allow forked process of the daemon to send REDAY=1 notification?

It works when Type=forking and PIDFile is specified, but can we have
Type=forking and without PIDFIle, notify READY=1 via forked process ?

My systemd version

$ systemd --version
systemd 229
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to