/[packages]/updates/2/tomcat/current/SOURCES/tomcat-7.0.init
ViewVC logotype

Diff of /updates/2/tomcat/current/SOURCES/tomcat-7.0.init

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 338836 by schedbot, Sun May 27 17:50:45 2012 UTC revision 338837 by dmorgan, Fri Jan 4 23:34:49 2013 UTC
# Line 149  function start() { Line 149  function start() {
149       return       return
150     fi     fi
151     if [ -f "/var/lock/subsys/${NAME}" ]; then     if [ -f "/var/lock/subsys/${NAME}" ]; then
152          if [ -f "/var/run/${NAME}.pid" ]; then          if [ -s "/var/run/${NAME}.pid" ]; then
153              read kpid < /var/run/${NAME}.pid              read kpid < /var/run/${NAME}.pid
154  #           if checkpid $kpid 2>&1; then  #           if checkpid $kpid 2>&1; then
155              if [ -d "/proc/${kpid}" ]; then              if [ -d "/proc/${kpid}" ]; then
# Line 210  function stop() { Line 210  function stop() {
210        fi        fi
211        if [ "$RETVAL" -eq "0" ]; then        if [ "$RETVAL" -eq "0" ]; then
212           count="0"           count="0"
213           if [ -f "/var/run/${NAME}.pid" ]; then           if [ -s "/var/run/${NAME}.pid" ]; then
214              read kpid < /var/run/${NAME}.pid              read kpid < /var/run/${NAME}.pid
215              until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \              until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \
216                        [ "$count" -gt "$SHUTDOWN_WAIT" ]; do                        [ "$count" -gt "$SHUTDOWN_WAIT" ]; do
# Line 262  case "$1" in Line 262  case "$1" in
262          start          start
263          ;;          ;;
264      condrestart|try-restart)      condrestart|try-restart)
265          if [ -f "/var/run/${NAME}.pid" ]; then          if [ -s "/var/run/${NAME}.pid" ]; then
266              stop              stop
267              start              start
268          fi          fi
# Line 271  case "$1" in Line 271  case "$1" in
271          RETVAL="3"          RETVAL="3"
272          ;;          ;;
273      force-reload)      force-reload)
274          if [ -f "/var/run/${NAME}.pid" ]; then          if [ -s "/var/run/${NAME}.pid" ]; then
275              stop              stop
276              start              start
277          fi          fi
278          ;;          ;;
279      status)      status)
280          if [ -f "/var/run/${NAME}.pid" ]; then          if [ -s "/var/run/${NAME}.pid" ]; then
281              read kpid < /var/run/${NAME}.pid              read kpid < /var/run/${NAME}.pid
282              if [ -d "/proc/${kpid}" ]; then              if [ -d "/proc/${kpid}" ]; then
283                  log_success_msg "${NAME} (pid ${kpid}) is running..."                  log_success_msg "${NAME} (pid ${kpid}) is running..."

Legend:
Removed from v.338836  
changed lines
  Added in v.338837

  ViewVC Help
Powered by ViewVC 1.1.30