This works for us; it goes in /etc/rc.d/init.d/orion, with the usual links 
to rc.X.  We're using a script in the orion directory for convenience, and 
we haven't sorted out running Orion as something other than root, both of 
which are security holes.

This isn't adequate for Internet accessible production, but works for our 
development machine.  Blackdown's not the speediest JVM ever, either...

BTW, has anyone tried to run Orion chrooted?  Did you get it to work?

Kirk Yarina

At 06:51 PM 10/5/00 -0400, you wrote:
>Hi, everyone:
>
>I know some of you guys use linux as the platform for running Orion server.
>Do you use the Sys V script to startup and shutdown the Orion server? If you
>do, could you please send me a copy of the script? If not, is there any
>solution to startup the Orion server when the OS bootup?
>
>thanks!
>
>Sean

#!/bin/sh
#
# Startup script for the Orion App Server
#
# processname: java


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

PATH=$PATH:/local/Blackdown/jdk1.2.2/bin
export PATH

ORION_HOME=<your path here/>

# See how we were called.
case "$1" in
   start)
         echo -n "Starting orion: "
         daemon $ORION_HOME/start.sh
         echo
         touch /var/lock/subsys/orion
         ;;
   stop)
         echo -n "Shutting down orion: "
         (
                 cd $ORION_HOME
                 java -jar admin.jar ormi://localhost/ admin 123 -shutdown
         ) && success "orion shutdown" || failure "orion shutdown"
         echo
         rm -f /var/lock/subsys/orion
         ;;
   status)
         # status httpd
         echo No status available from rc.d script.
         echo Use the orion status monitor program.
         echo
         ;;
   restart)
         $0 stop
         $0 start
         ;;
   reload)
         echo Orion does not dynamically reload, use restart.
         echo
         ;;
   *)
         echo "Usage: $0 {start|stop|restart|reload|status}"
         exit 1
esac

exit 0

And $ORION_HOME/start.sh

#! /bin/sh

PATH=$PATH:/local/Blackdown/jdk1.2.2/bin
ORION_HOME=<your path here/>

(
         cd $ORION_HOME
         nohup /bin/sh -c "/local/Blackdown/jdk1.2.2/bin/java -Xmx128m -jar 
orion
.jar > out.log 2> err.log" &
)


Kirk Yarina
[EMAIL PROTECTED]


Reply via email to