Am Thu, 8 Apr 2010 15:16:36 -0400 schrieb "Eric B." <ebe...@hotmail.com>:
> So what my init.d script currently does is pre-create an empty pid > file in the /var/run directory, then changes ownership of it to > "tomcat" so that tomcat can then update it with the actual pid of the > tomcat process. > > Given that there is no way for the startup script to write to > the /var/run directory, my options are fairly limited without > modifying it. 1) Change the location of the pid file. 2) Make > the /var/run directory tomcat writable by default (via acl or by mode > permissions) Neither option particularly appeals to me. Your solution with creating an empty PID-file, changing the ownership and filling it afterwards with the PID-number sounds a little bit complicated and I doubt that there are a lot of installations using this approach. We created a special directory for the tomcat-PID-files (we're running up to 8 Tomcats on one hardware) in order to keep the PIDs together and set the "sticky bit" for this directory (looks similar to the usual settings of /tmp) to restrict access to the PID-files once they are created by catalina.sh: [te...@mikesch ~]$ ls -l /srv/ drwxr-xrwt 2 root root 4096 8. Apr 08:08 run te...@mikesch ~]$ ls -l /srv/run/ -rw-r--r-- 1 crm crm 6 8. Apr 04:03 TCcrm.pid -rw-r--r-- 1 premiere premiere 6 8. Apr 08:08 TCpremiere.pid Changing the path of the PID-file is pretty simple by setting CATALINA_PID before calling catalina.sh: CATALINA_PID=/srv/run/TCcrm.pid BTW: I have no opinion concerning the patch of catalina.sh you suggested, sorry. BTW2: We aren't so happy with the change of the default-catalina.sh in 6.0.26, too, but as we separated tomcat's bin-directory from tomcat's "symlinked" default-installation for some historical reason, it causes no trouble with rebooted hardware as we still use the "old" catalina.sh. Regards, Tobias. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org