Lines 132-162
Link Here
|
132 |
} |
132 |
} |
133 |
|
133 |
|
134 |
tomcat%%TOMCAT_VERSION%%_stop() { |
134 |
tomcat%%TOMCAT_VERSION%%_stop() { |
135 |
rc_pid=$(check_pidfile $pidfile $procname) |
135 |
if [ ! -e "$pidfile" ]; then |
136 |
|
136 |
echo "${name} not running? (check $pidfile)." |
137 |
if [ -z `cat $pidfile` ]; then |
|
|
138 |
[ -n `cat $pidfile` ] && return 0 |
139 |
if [ -n `cat $pidfile` ]; then |
140 |
echo "${name} not running? (check $pidfile)." |
141 |
else |
142 |
echo "${name} not running?" |
143 |
fi |
144 |
return 1 |
137 |
return 1 |
145 |
fi |
138 |
fi |
146 |
|
139 |
|
147 |
echo "Stopping ${name}." |
140 |
echo "Stopping ${name}." |
148 |
${java_command} stop |
141 |
${java_command} stop |
149 |
tomcat_wait_max_for_pid ${tomcat%%TOMCAT_VERSION%%_stop_timeout} `cat $pidfile` |
142 |
tomcat_wait_max_for_pid ${tomcat%%TOMCAT_VERSION%%_stop_timeout} `cat $pidfile` |
150 |
kill -KILL ${rc_pid} 2> /dev/null && echo "Killed." |
143 |
kill -KILL `cat $pidfile` 2> /dev/null && echo "Killed." |
151 |
echo -n > ${pidfile} |
144 |
rm -f ${pidfile} |
152 |
} |
145 |
} |
153 |
|
146 |
|
154 |
tomcat%%TOMCAT_VERSION%%_status() { |
147 |
tomcat%%TOMCAT_VERSION%%_status() { |
155 |
if [ ! -f $pidfile ]; then |
148 |
if [ ! -e "$pidfile" ]; then |
156 |
pid_touch |
|
|
157 |
fi |
158 |
|
159 |
if [ -z `cat $pidfile` ]; then |
160 |
echo "${name} is not running." |
149 |
echo "${name} is not running." |
161 |
return 1 |
150 |
return 1 |
162 |
else |
151 |
else |