I have an executable file called
jboss in the current directory:
-rwxr-xr-x 1 test jboss 7151 Aug 5 11:04 jboss
An in the file jboss it looks as follow:
Code:
...
#---------------------------
# command handling
#---------------------------
case "$1" in
start)
if [ -n "`ps -fu $JBOSSUSER | grep -v grep | grep java |grep -v Agent | grep $CONTEXT`" ]
then
echo "Java/JBoss is already running - no action taken"
else
$ISDIR/$MYNAME cleanup
echo "starting: Jboss"
echo "check log file for completion!!"
# check that we are the jboss user or set su for usage
ME=`whoami`
if [ "$ME" = "$JBOSSUSER" ]; then
$CMD_START >$JBOSS_CONSOLE 2>&1 &
#echo "$CMD_START >$JBOSS_CONSOLE 2>&1 "
else
$CMD_START >$JBOSS_CONSOLE 2>&1 &
#echo" $SUBIT "$CMD_START" >$JBOSS_CONSOLE 2>&1 "
#$SUBIT $CMD_START >$JBOSS_CONSOLE 2>&1
fi
fi
;;
...
When I call this executable file with jboss start, I got error as follow:
-bash: jboss: command not found
Someone call help?