tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Souther <bpsout...@adelphia.net>
Subject Re: Tomcat startup script
Date Sat, 15 Nov 2003 00:29:07 GMT
On Friday 14 November 2003 07:21 am, you wrote:
> I'm looking for a startup script for Tomcat for starting it at system boot.
>
> Thanks!
>
> Roberto.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



#!/bin/sh
#
. /etc/rc.d/init.d/functions

TOMCAT_USER=nobody

# See how we were called.
case "$1" in
  start)
        echo -n "Starting tomcat: "
        su -l $TOMCAT_USER -c '/usr/local/tomcat/bin/startup.sh'
        echo
        ;;
  stop)
        echo -n "Stopping tomcat: "
        su -l $TOMCAT_USER -c '/usr/local/tomcat/bin/shutdown.sh'
        echo
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit 0

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message