I have an upstart
script that is used to start apache tomcat on an RHEL 6.8 system. The upstart script is as follows
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec >/root/Desktop/test.debug 2>&1
exec su -s opt/apache-tomcat/bin/startup.sh tomcat
Apache tomcat starts but when it forks
or something in the startup.sh
script upstart think the process has died and keeps trying to respawn until the respawn limit is hit.
Is there anyway in the upstart script to make sure it will track the correct tomcat PID
?