[systemd-devel] tomcat start up script wait for message

Tyler Couto tcouto at certain.com
Wed Oct 12 18:36:27 UTC 2016


Thank you for responding, Mantas. I haven’t gotten around to checking this out.

Tyler

From: Mantas Mikulėnas <grawity at gmail.com<mailto:grawity at gmail.com>>
Date: Tuesday, October 4, 2016 at 10:57 AM
To: Tyler Couto <tcouto at certain.com<mailto:tcouto at certain.com>>
Cc: "systemd-devel at lists.freedesktop.org<mailto:systemd-devel at lists.freedesktop.org>" <systemd-devel at lists.freedesktop.org<mailto:systemd-devel at lists.freedesktop.org>>
Subject: Re: [systemd-devel] tomcat start up script wait for message

On Tue, Oct 4, 2016 at 8:32 PM, Tyler Couto <tcouto at certain.com<mailto:tcouto at certain.com>> wrote:
Hi all,

We have a tomcat application that requires some initialization after
tomcat starts up. That is, we run an initialize script after catalina.out
says ?'Server startup in:'. Currently we do this in a number of ways:
manually, through a custom tail script, or through logstash. But I¹m
thinking it might be best to let the init system do it. Is this a good
idea? And if so, how best to implement it?

systemd will not react to stdout messages, but it does have Type=notify which will react to a "READY=1" message sent via Unix socket – ideally directly by the program (see sd_notify, $NOTIFY_SOCKET) but also possibly via the `systemd-notify` tool:

    sd_notify(0, "READY=1");

    systemd-notify --ready

--
Mantas Mikulėnas <grawity at gmail.com<mailto:grawity at gmail.com>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20161012/879cf057/attachment.html>


More information about the systemd-devel mailing list