Thursday, March 25, 2010

BASH bleg

I've got a script provided by Oracle.  I don't like it - it does not play well with my init script.  Before I tear down that fence I'd like to try to understand why the fence was built the way it was.

The Script

. ./
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. 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: " ./ not found".

Is there a reason for doing it this way over capturing the directory into a variable using dirname?
blog comments powered by Disqus