LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't get my init script working (http://www.linuxquestions.org/questions/linux-newbie-8/cant-get-my-init-script-working-263135/)

nukeu666 12-06-2004 03:12 AM

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

bathory 12-06-2004 05:16 AM

Is the script executable? What happens if you run the script from the command line?

nukeu666 12-06-2004 06:34 AM

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?

hk_linux 12-06-2004 08:16 AM

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?

nukeu666 12-16-2004 11:12 AM

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


All times are GMT -5. The time now is 04:30 AM.