the best way to do it is to create a service script and place it in 
/etc/rc.d/init.d/

and chkconfig --add jboss

/etc/rc.d/init.d/jboss :

#! /bin/bash
#
# jboss       Bring up/down jboss server.
#
# chkconfig: 35 98 02
# description: Activates/Deactivates the Jboss server
# probe: false

# Source function library.
 /etc/init.d/functions

case "$1" in
  start)
        cd /home/jboss/JBoss-2.4.10/jboss/bin
        #or just run.sh...
        ./run_with_jetty.sh & 
        echo $! > /var/run/jboss.pid
        ;;
  stop)
        cd /home/jboss/JBoss-2.4.10/jboss/bin
        ./stop.sh
        rm -f /var/run/jboss.pid
        ;;
 status)
        status jboss
        ;;

  restart)
        stop
        #just to be sure
        sleep 5
        start
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|status}"
        exit 1
esac

exit 0


On Thursday 29 May 2003 11:01, Shai Bentin wrote:
> Question:
>
> JBoss needs to run as root on my machine. I want to add to it's startup
> script a sequence that changes the user to root. HOw do I do it.
>
> Thanks
>
> Shai
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]

-- 
Uzi Refaeli
Developer
Dotomi LTD
[EMAIL PROTECTED]
972-67-939289
http://www.dotomi.com

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to