The above code is for linux and on the office's linux box this script runs fine and on the box of the client this script won't run... here is the error codeCode:# This is the init script for starting up the # Jakarta Tomcat server # # chkconfig: 345 91 10 # description: Starts and stops the Project Yagi daemon. # # Source function library. . /etc/rc.d/init.d/functions # Get config. . /etc/sysconfig/network # Check that networking is up. [ "${NETWORKING}" = "no" ] && exit 0 tomcat=/usr/tomcat SWEBLIBPATH=/usr/local/sweb SWEB_BAT=$SWEBLIBPATH/Tomcat/runtomcat.sh startup=$SWEB_BAT shutdown=$tomcat/bin/shutdown.sh start(){ echo -n $"Starting Project Yagi service sweb: " if [ -f /usr/X11R6/bin/Xvfb ]; then echo "***Starting up the Virtual Frame Buffer on Screen 1***" /usr/X11R6/bin/Xvfb :1 -screen 0 1x1x8 > /dev/null 2>&1 & /usr/X11R6/bin/Xvfb :1 -screen 0 1152x900x8 & fi export DISPLAY=:1.0 #start mysql version 4.0.18 cd /etc/init.d bash mysqld stop /usr/local/mysql/bin/mysqld_safe --user=mysql & RETVAL=$? & echo } stop(){ action $"Stopping Tomcat service: " > /dev/null 2>&1 RETVAL=$? echo } restart(){ stop start } status(){ numproc=`ps -ef | grep catalina | grep -v "grep catalina" | wc -l` if [ $numproc -gt 0 ]; then echo "Tomcat is running..." else echo "Tomcat is stopped..." fi } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) # This doesn't work ;) status ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|status|restart}" exit 1 esac exit 0
wot could possibly be wrong with this... i'm sorry to post this here. but I just don't know what category this question is.Code:[user@RW user]$ bash tomcat.sh start : command not found : command not found : command not found : command not found : command not found : command not found : command not found : command not found : command not found 'omcat.sh: line 26: syntax error near unexpected token `{ 'omcat.sh: line 26: `start(){ [user@RW user]$
*edit
the above code works in fedora core while an error will occur in the REDHAT 9...![]()



Reply With Quote
