LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apache tomcat startup script not booting at startup. (https://www.linuxquestions.org/questions/linux-newbie-8/apache-tomcat-startup-script-not-booting-at-startup-4175492226/)

Grtyop 01-22-2014 08:54 PM

apache tomcat startup script not booting at startup.
 
I copied the script from this link - Askubuntu Link

The script can be started manually, bu doesn't work on startup.

Could it be because I've to change the "PATH=/sbin:/bin:/usr/sbin:/usr/bin " ?

I modified the script to suit my install directory as follows :

Code:

#!/bin/bash

### BEGIN INIT INFO
# Provides:        tomcat6
# Required-Start:  $network
# Required-Stop:  $network
# Default-Start:  2 3 4 5
# Default-Stop:    0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

start() {
 sh /home/drg/Desktop/apache/bin/startup.sh
}

stop() {
 sh /home/drg/Desktop/apache/bin/shutdown.sh
}

case $1 in
  start|stop) $1;;
  restart) stop; start;;
  *) echo "Run as $0 <start|stop|restart>"; exit 1;;
esac


SAbhi 01-22-2014 09:22 PM

if it is in init.d it should start on its own with what mentioned in the link you gave (of course if you have followed it correctly) or try running "chkconfig tomcat7 on" against it.

Grtyop 01-23-2014 02:57 AM

I do not have chkconfig, as I am on a debian-based distro..

I will install it and see what happens.


All times are GMT -5. The time now is 02:28 PM.