LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2014, 09:54 PM   #1
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Rep: Reputation: Disabled
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
 
Old 01-22-2014, 10:22 PM   #2
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
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.
 
Old 01-23-2014, 03:57 AM   #3
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Original Poster
Rep: Reputation: Disabled
I do not have chkconfig, as I am on a debian-based distro..

I will install it and see what happens.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to start mysql server & apache server at startup and then tomcat at last at boot sanjay87 Linux - Server 5 06-16-2012 09:19 AM
[SOLVED] tomcat startup script tkmsr Linux - Server 14 02-21-2011 06:31 PM
Lenny not booting after wrong startup script added austinium Debian 1 05-14-2010 09:07 AM
Custom startup script for apache - where to put them Swakoo Linux - General 3 08-10-2007 07:11 AM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 02:31 AM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration