On Fri, 2004-09-24 at 14:40, Richard Lewis wrote:
But it still doesn't stop properly and I think (from switching off --quiet) that its because start-stop-daemon is looking for a process called catalina.sh (I still can't get it to create a process id file) which it doesn't find because the process is called 'java'.
I very much doubt the running process name is relevant; if they did kill processes by name they might end up shooting the wrong one.
The "catalina.sh stop" first tries to shut down tomcat gracefully (by invoking java), and kills it otherwise. So you don't need/want the init.d script to do the killing.
From the Gentoo /etc/init.d/tomcat script:
stop() { ebegin "Stopping Tomcat" start-stop-daemon --start --quiet \ --chuid tomcat:tomcat \ --exec ${CATALINA_HOME}/bin/catalina.sh -- ${TOMCAT_STOP}
Note that it calls "--start", not "--stop".
That's essentially the same as your solution.
-- Martijn