LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 (https://www.linuxquestions.org/questions/mandriva-30/tomcat-init-script-not-working-on-startup-tomcat-4-x-mandrake-linux-8-0-a-154863/)

jmartinph 03-08-2004 01:31 AM

TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0
 
I am having a problem auto-starting TOMCAT on init/boot in Mandrake 8.0
I still have to login to my account ang start the tomcat init script (shown below) to be able to bring the TOMCAT server up. I also checked the Control Service Activity under linuxconf -> control panel and tomcat script is listed there as Automatic with run Level 2, 3, 5 but still
tomcat doesn't run on startup. Anybody here? Very much appreciated.. thanks


jun

Code:

# tomcat -- init script
#        This is the init script for starting up the
#                Jakarta Tomcat server
#
# chkconfig: 345 91 10
# description: Starts and stops the Tomcat daemon.
#

# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
. /etc/sysconfig/network

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0

tomcat=/usr/local/jakarta-tomcat
startup=$tomcat/bin/startup.sh
shutdown=$tomcat/bin/shutdown.sh
#export JAVA_HOME=/usr/local/jdk  -- i have this already....

start(){
        echo -n $"Starting Tomcat service: "
        # Change to tomcat user to start server. Don't run as root.
        #daemon -c
        $startup
        RETVAL=$?
        echo
}

stop(){
        action $"Stopping Tomcat service: " $shutdown       
        RETVAL=$?
        echo
}

restart(){
    stop
    start
}


# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        # This doesn't work ;)
        status tomcat
        ;;
  restart)
        restart
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart}"
        exit 1
esac

exit 0



All times are GMT -5. The time now is 06:18 AM.