<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Thank you for responding, Mantas. I haven’t gotten around to checking this out.</div><div><br></div><div>Tyler</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>><br><span style="font-weight:bold">Date: </span> Tuesday, October 4, 2016 at 10:57 AM<br><span style="font-weight:bold">To: </span> Tyler Couto <<a href="mailto:tcouto@certain.com">tcouto@certain.com</a>><br><span style="font-weight:bold">Cc: </span> "<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a>" <<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a>><br><span style="font-weight:bold">Subject: </span> Re: [systemd-devel] tomcat start up script wait for message<br></div><div><br></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 4, 2016 at 8:32 PM, Tyler Couto <span dir="ltr"><<a href="mailto:tcouto@certain.com" target="_blank">tcouto@certain.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br><br>
We have a tomcat application that requires some initialization after<br>
tomcat starts up. That is, we run an initialize script after catalina.out<br>
says ?'Server startup in:'. Currently we do this in a number of ways:<br>
manually, through a custom tail script, or through logstash. But I¹m<br>
thinking it might be best to let the init system do it. Is this a good<br>
idea? And if so, how best to implement it?<br></blockquote><div><br></div><div>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:</div><div><br></div><div>    sd_notify(0, "READY=1");</div><div><br></div><div>    systemd-notify --ready </div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div></div></div></span></body></html>