- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsThis is my startup script to start jboss on boot on redhat
**************************
#! /bin/sh
# chkconfig: 345 89 60
# description: startup script for jboss
ECHO=/bin/echo
TEST=/usr/bin/test
JBOSS_START_SCRIPT=/opt/jb
JBOSS_STOP_SCRIPT=/opt/jbo
$TEST -x $JBOSS_START_SCRIPT || exit 0
$TEST -x $JBOSS_STOP_SCRIPT || exit 0
depend() {
need local
}
start() {
$ECHO –n "Starting JBoss"
source /etc/profile
runuser - jboss -c "$JBOSS_STOP_SCRIPT" > /dev/null 2> /dev/null &"
$ECHO "."
}
stop() {
$ECHO –n "Stopping JBoss"
runuser - jboss -c "$JBOSS_STOP_SCRIPT -S > /dev/null $"
$ECHO "."
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 60
start
;;
*)
$ECHO "Usage: jboss {start|stop|restart}"
exit 1
esac
**************************
When I run jboss start from the prompt , I am getting this error
[root@localhost ~]# service jbossd start
/etc/init.d/jbossd: line 8: -Djava.awt.headless=true: command not found
â?"n Starting JBoss
.
**************************
if i type this at the prompt /opt/jboss-4.0.3SP1/bin/ru
I thought it was not able to get the path for java..however thats set in the environment variables. This is the output of my export command for user jboss
**************************
declare -x G_BROKEN_FILENAMES="1"
declare -x HISTSIZE="1000"
declare -x HOME="/home/jboss"
declare -x HOSTNAME="localhost"
declare -x INPUTRC="/etc/inputrc"
declare -x JAVA_HOME="/opt/j2sdk1.4.2
declare -x KDEDIR="/usr"
declare -x LANG="en_US.UTF-8"
declare -x LESSOPEN="|/usr/bin/lesspi
declare -x LOGNAME="jboss"
declare -x LS_COLORS=""
declare -x MAIL="/var/spool/mail/jbos
declare -x OLDPWD
declare -x PATH="/opt/j2sdk1.4.2_12/b
2/jre/bin:/opt/j2sdk1.4.2_
sr/bin:/usr/X11R6/bin:/hom
declare -x PWD="/home/jboss"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_ASKPASS="/usr/libexec/
declare -x TERM="cygwin"
declare -x USER="jboss"
**************************
this is the ouput of the export command for root
**************************
declare -x G_BROKEN_FILENAMES="1"
declare -x HISTSIZE="1000"
declare -x HOME="/root"
declare -x HOSTNAME="localhost"
declare -x INPUTRC="/etc/inputrc"
declare -x JAVA_HOME="/opt/j2sdk1.4.2
declare -x KDEDIR="/usr"
declare -x LANG="en_US.UTF-8"
declare -x LESSOPEN="|/usr/bin/lesspi
declare -x LOGNAME="root"
declare -x LS_COLORS=""
declare -x MAIL="/var/spool/mail/root
declare -x OLDPWD
declare -x PATH="/opt/j2sdk1.4.2_12/b
2/jre/bin:/opt/j2sdk1.4.2_
r/local/sbin:/usr/local/bi
in"
declare -x PWD="/root"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_ASKPASS="/usr/libexec/
declare -x SSH_CLIENT="::ffff:10.1.1.
declare -x SSH_CONNECTION="::ffff:10.
declare -x SSH_TTY="/dev/pts/1"
declare -x TERM="cygwin"
declare -x USER="root"
**************************
I am sure I am missing soemthing very trivial...and my unix is a little rusty
why am i getting a command not found error??
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: shinobunPosted on 2006-09-19 at 20:15:29ID: 17557890
Try this instead in line 8:
boss-4.0.3 SP1/bin/ru n.sh -Djava.awt.headless=true"
JBOSS_START_SCRIPT="/opt/j
I think you need to quote any variables with spaces in them.