This is the script that I use in my Red Hat box:
$ cat /etc/init.d/jrun <--- This of course is not part of the script
#!/bin/bash
Jrun_bin=/opt/JRun/bin
case "$1" in
'start')
echo "Starting JRun"
$Jrun_bin/jrun -start
touch /var/lock/subsys/jrun
;;
'stop')
echo "Stopping JRun"
$Jrun_bin/jrun -stop
rm -f /var/lock/subsys/jrun
;;
'restart')
$0 stop
$0 start
;;
'status')
$Jrun_bin/jrun -status
;;
*)
echo "Usage: jrun {start|stop|restart|status}"
exit 1
esac
exit 0
I have the following symbolic links pointing to the script:
/etc/rc.d/rc0.d/K02jrun -> /etc/init.d/jrun
/etc/rc.d/rc3.d/S98jrun -> /etc/init.d/jrun
/etc/rc.d/rc5.d/S98jrun -> /etc/init.d/jrun
/etc/rc.d/rc6.d/K02jrun -> /etc/init.d/jrun
I do not have the script configured for chkconfig yet, but this works
for me as it is. Check out the man pages for chkconfig.
Hope this helps.
On Wed, 2002-02-13 at 01:02, Ben Groeneveld wrote:
> Dan, you add it to your local startup script, usually an rc.local, or
> create a startup script by cloning one of the many in /etc/rc.d/init.d
> if you are running a sysv unix like red hat linux (maybe macromedia will
> soon ship a template like other vendors). After cloning you use a
> utility like chkconfig to ensure the new script fires up at the
> appropriate run level by creating some symbolic links. Hope that helps,
> BenG.
>
> Dan Tran wrote:
>
> >what about unix?
> >
> >Is there a way to automate this?
> >
> >-Dan
> >
> >
> >>From: "Bob Buford" <[EMAIL PROTECTED]>
> >>Reply-To: [EMAIL PROTECTED]
> >>To: JRun-Talk <[EMAIL PROTECTED]>
> >>Subject: RE: Starting JRun Servers as Service
> >>Date: Tue, 12 Feb 2002 16:39:36 -0500
> >>
> >>jrun -install <NT-service_name> <server_name>
> >>
> >>like
> >>
> >>jrun -install "JRun GCPC Server" gcpc
> >>
> >>see p87 of the JRun 3.0 Setup Guide
> >>
> >>Bob
> >>
> >>
> >>-----Original Message-----
> >>From: Drew Falkman [mailto:[EMAIL PROTECTED]]
> >>Sent: Tuesday, February 12, 2002 4:38 PM
> >>To: JRun-Talk
> >>Subject: Starting JRun Servers as Service
> >>
> >>
> >>On this note...
> >>
> >>Does anyone know how to start a JRun Server as a service, as the Default
> >>Server and Admin Server do?
> >>
> >>Thanks.
> >>
> >>-Drew Falkman
> >>
> >>-----Original Message-----
> >>From: Dan Tran [mailto:[EMAIL PROTECTED]]
> >>Sent: Tuesday, February 12, 2002 1:24 PM
> >>To: JRun-Talk
> >>Subject: Re: JRUN Startup and Shutdown Settings????
> >>
> >>
> >>I think what Restrepo meant was how to start Jrun
> >>automatically during system startup
> >>
> >>I wonder if JRUN folks have any recommendation on how ot do this?
> >>
> >>On the W2K, we have the option to start JRUN under
> >>service.
> >>
> >>What about Unix?
> >>
> >>-Dan
> >>
> >>----- Original Message -----
> >>From: "Ben Groeneveld" <[EMAIL PROTECTED]>
> >>To: "JRun-Talk" <[EMAIL PROTECTED]>
> >>Sent: Tuesday, February 12, 2002 12:19 PM
> >>Subject: Re: JRUN Startup and Shutdown Settings????
> >>
> >>
> >>>Alex, you may look into the init method of a servlet that is
> >>>
> >>designated
> >>
> >>>to be loaded on container startup by the web.xml, and use the destroy
> >>>method of the same servlet. Hopt that helps, BenG.
> >>>
> >>>RESTREPO, ALEXANDER G [Non-Pharmacia/1000] wrote:
> >>>
> >>>>Hello,
> >>>>
> >>>>I want to be able to run a JSP
> >>>>which stops a socket service when JRUN
> >>>>is shutdown. I also want to be able
> >>>>to run a JSP which starts a Socket Service
> >>>>when JRUN starts up again.
> >>>>
> >>>>Does anyone know if their is a good
> >>>>method to do this without creating specialized
> >>>>shell scripts? Are their any JRUN settings or
> >>>>files which can be modified to do this?
> >>>>
> >>>>
> >>>>Many Thanks:
> >>>>
> >>>>Alex Restrepo
> >>>>
> >>
> >>
> >
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists