Am 15.08.2017 um 05:59 schrieb Kalpa Gunarathna:
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
MAINPID is supposed to send the notify
Type=notify needs to be explicit supported by the daemon
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel