LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-06-2004, 03:12 AM   #1
nukeu666
Member
 
Registered: Mar 2004
Location: India
Distribution: MDK, Fedora, Debian Unstable (current)
Posts: 80

Rep: Reputation: 15
can't get my init script working


i made a script 'tomcat' in /etc/init.d/tomcat

#!/bin/sh
JAVA_HOME=/usr/java/j2sdk1.4.2_05/
CLASSPATH=/usr/jakarta-tomcat-4.1.31/common/lib/servlet.jar
CATALINA_HOME=/usr/jakarta-tomcat-4.1.31
export JAVA_HOME
export CLASSPATH
export CATALINA_HOME
.$CATALINA_HOME/bin/startup.sh

then i made a symbolic link to it in rc5.d by 'ln -s /etc/init.d/tomcat S99tomcat'

it doesnt work...what am i doing wrong?
im working on FC2
 
Old 12-06-2004, 05:16 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Is the script executable? What happens if you run the script from the command line?
 
Old 12-06-2004, 06:34 AM   #3
nukeu666
Member
 
Registered: Mar 2004
Location: India
Distribution: MDK, Fedora, Debian Unstable (current)
Posts: 80

Original Poster
Rep: Reputation: 15
it wasnt exceutable before....
atleast now the last line is working(startup.sh) but the variables are not getting set.
am i supposed to use the variable setting in another file?
if i add those export lines in /root/.bash_profile........will it be set for all users on boot?
 
Old 12-06-2004, 08:16 AM   #4
hk_linux
Member
 
Registered: Nov 2004
Location: India
Distribution: RedHat, PCQLinux, Fedora
Posts: 95

Rep: Reputation: 15
If you in /root.bashrc, it will be only for root user.
Try putting on /etc/profile

A small point, may be worth looking into. Is the init run level in 5?
 
Old 12-16-2004, 11:12 AM   #5
nukeu666
Member
 
Registered: Mar 2004
Location: India
Distribution: MDK, Fedora, Debian Unstable (current)
Posts: 80

Original Poster
Rep: Reputation: 15
putting the env. lines in etc/profile worked
but now startup.sh isnt getting run as $CATALINA_HOME/.../startup.sh or /fullpath/startup.sh or 'sh /fullpath/startup.sh/

and it is in runlevel 5
 
  


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
homemade init script not working scylla Linux - General 2 01-21-2005 07:26 PM
Init Script for p4d not working UglyWrangler Linux - Newbie 2 01-18-2005 10:45 AM
help with init script output ierickson Linux - General 0 05-07-2004 12:05 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
could use some help with my init.d script.... BrianK Linux - General 3 10-31-2002 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:04 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
Open Source Consulting | Domain Registration