The Script
#!/bin/sh
. ./setEnv.sh
HOST_NAME=deprecated
WLS_USERNAME=superadmin
export WLS_USERNAME
WLS_PW=agile
export WLS_PW
$JAVA_HOME/bin/java -classpath $CLASSPATH weblogic.Admin -url $HOST_NAME:7001 SHUTDOWN -username $WLS_USERNAME -password $WLS_PW
I'm confused about line 2. setEnv.sh is important - a lot of environment information specific to my install is in there that the app needs to start and stop.
The problem with this if you call it from a script that lives in /etc/init.d it fails: " ./setEnv.sh: not found".
Is there a reason for doing it this way over capturing the directory into a variable using dirname?