|
@@ -3,13 +3,27 @@
|
|
|
## rc.tomcat -- Run-Commands for Tomcat
|
|
|
##
|
|
|
|
|
|
-%env
|
|
|
- TOMCAT_HOME="@l_prefix@/libexec/tomcat"
|
|
|
- export TOMCAT_HOME
|
|
|
+%config
|
|
|
+ tomcat_enable="yes"
|
|
|
+ tomcat_home="@l_prefix@/libexec/tomcat"
|
|
|
|
|
|
%start -u root
|
|
|
- @l_prefix@/libexec/tomcat/bin/tomcat.sh start
|
|
|
+ if opServiceEnabled tomcat; then
|
|
|
+ JAVA_HOME="$jdk_home"; export JAVA_HOME
|
|
|
+ TOMCAT_HOME="$tomcat_home"; export TOMCAT_HOME
|
|
|
+ @l_prefix@/libexec/tomcat/bin/tomcat.sh start
|
|
|
+ fi
|
|
|
|
|
|
%stop -u root
|
|
|
- @l_prefix@/libexec/tomcat/bin/tomcat.sh stop
|
|
|
+ if opServiceEnabled tomcat; then
|
|
|
+ JAVA_HOME="$jdk_home"; export JAVA_HOME
|
|
|
+ TOMCAT_HOME="$tomcat_home"; export TOMCAT_HOME
|
|
|
+ @l_prefix@/libexec/tomcat/bin/tomcat.sh stop
|
|
|
+ fi
|
|
|
+
|
|
|
+%env
|
|
|
+ if opServiceEnabled tomcat; then
|
|
|
+ TOMCAT_HOME="$tomcat_home"
|
|
|
+ export TOMCAT_HOME
|
|
|
+ fi
|
|
|
|