[ 
https://issues.apache.org/jira/browse/DAEMON-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847877#action_12847877
 ] 

Christopher Schultz commented on DAEMON-153:
--------------------------------------------

Rob,
Thanks for the patch!

I would recommend the following changes:

1. Put pid file back in /var/run... it's more standard than /tmp I think
2. Remove JAVA_HOME/rt.jar from the CLASSPATH... the JVM should automatically 
add all the bootstrap stuff
3. Remove -debug switch from jsvc invocation
4. Make the -jvm and -wait options into script variables instead of forcing 
values: it's nice when all configuration can be done via variables instead of 
editing the script itself
5. Quote all uses of the following variables: CATALINA_HOME, CATALINA_BASE, 
JAVA_HOME, TMP_DIR, CLASSPATH, DAEMON, PID_FILE (basically all variables that 
could contain spaces and would really hose things if a space were in them)
6. I'm' disturbed by the 'chown' you've added: there's no need for the user to 
'own' those files... just that they have read access to them. Also, the 
username may not be valid as a group name :(
7. Allow the user to specify the location of 'curl' and check to make sure it 
exists and is runnable before trying to run it (maybe an error message that 
'curl' is not found is good enough, which the shell should do for you) else 
you'll get a spurious message that Tomcat isn't running if curl isn't available
8. Honestly, I think I'd remove the 'status' option entirely: though useful, it 
has nothing to do with jsvc. Alternatively, use the -check option on jsvc to 
check a running service :)
9. Does specifying -errfile as the same file as -outfile actuall work? I would 
expect that the file would be opened twice unless jsvc is very smary. You 
should use -errfile '&1' and -outfile "${CATALINA_BASE}/logs/catalina.out" 
instead. Write a simple servlet to write to both stderr and stdout to make sure 
both streams are going to the right place. If '&1' isn't working properly, log 
a bug for that.

> [PATCH] Update/fix of Tomcat5.sh script
> ---------------------------------------
>
>                 Key: DAEMON-153
>                 URL: https://issues.apache.org/jira/browse/DAEMON-153
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Jsvc
>    Affects Versions: 1.0.1
>         Environment: Linux (tested on Fedora 8 / EC2)
>            Reporter: Rob Slifka
>         Attachments: DAEMON-153.patch
>
>
> A few changes:
> - Enable default Tomcat logging behaviour (logs exist and now output to 
> $CATALINA_BASE/logs).
> - Added 'status' support, to ping a URL and report success if the host was 
> reachable and replied.
> - Added comments to give people a hint that further customization sourced 
> from catalina.sh may be required.
> - Updated to currently shipping defaults of Java (1.6.0_18) and Tomcat 
> (6.0.26).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to