dos2unix ...
Or use vi ...
Martin van den Bemt wrote:
>
> If you created the bash script not in vi, but eg adjusted stuff in write
> and
> saved it, you need to fix the lineendings.. (there is a util for that
> which
> was added again on rh7.1, but I forgot the name).. You can test if this
> is
> the problem by moving the script to eg tomcat_old do a vi tomcat and do
> something that show up at the screen.. If that works, you know for sure
> that
> your bash file is messed up.. Also a hint : try running it after startup
> and
> see if it works..
>
> Mvgr,
> Martin
>
> > -----Original Message-----
> > From: Roberto B. [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 17, 2001 5:37 PM
> > To: [EMAIL PROTECTED]
> > Subject: Tomcat before Apache
> >
> >
> > I use Linux/Debian as root, Apache 1.3 and Tomcat 4 b6
> >
> > I want to start automatically Tomcat before Apache.
> > I made this things :
> >
> > 1) I created this script named "tomcat":
> >
> > #! /bin/sh
> > TOMCAT_HOME=/usr/tomcat4b6
> > # Test tomcat.sh
> > if [ ! -x $TOMCAT_HOME/bin/tomcat.sh ]
> > then
> > echo "Tomcat not found"
> > exit
> > fi
> > case $1 in
> > start)
> > # Start service
> > $TOMCAT_HOME/bin/startup.sh
> > echo -ne "Tomcat started \n"
> > ;;
> > stop)
> > $TOMCAT_HOME/bin/shutdown.sh
> > ;;
> > esac
> >
> > 2) I insert this script in dir /etc/init.d
> > 3) chmod u+x tomcat
> > 4) in /etc/rc2.d (because default runlever is 2 in file inittab) this
> > command (because i have @S91apache):
> > ln -s ../init.d/tomcat S90tomcat
> >
> > 5) I rebooted the system and this is the result:
> >
> > :
> > :
> > etc/init.d/rc: /etc/rc2.d/S90tomcat: No such file or directory
> > apache started
> > :
> >
> > Why??
> >
> > Roberto
> >
> >
> >
> >