How can I run an application as a daemon?

Hello,
I have SLES9.
I am running a Java-application named meinServer5.
This app starts two application servers, one admin process and one worker process, where the admin process has to be started before and ended after the worker process:
**meinServer5 startadmin **// starts the admin process
**meinServer6 stopadmin **// stops the admin process
**meinServer5 start **//starts the worker process
**meinServer6 stop **// stops the worker process

Now I want to activate these two processes as daemons so that for one thing I can start/stop them like this:
**rcmeinWorker5 start **//stop
**rcmeinAdmin5 start **//stop
and also that I can start/stop them in specific runlevels.
The worker process should check whether the admin process is running since it is dependent on it.
Then I would like to be able to restart both process correctly in one shot.

How could I best go about this?
Most likely via bash scripts?
I appreciate any hints and tips.

Sincerley
Andreas

Read up these:
Suse RC Scripts
Cool Solutions: Creating Custom init Scripts
Chapter 7: Customizing the boot process

AndiMzD wrote:
> I have SLES9.

you are, of course, welcome to hang out here…though i guess your
fastest answer would come on the forum where most SLES folks meet:
forums.novell.com

i think they also have a forums search engine, and your answer might
be waiting for you to fine it…

these are the forums for openSUSE, most here are using openSUSE 11.2
and SLES9 is a long gone antique…most here have never even used a
SLES and wouldn’t be a lot of help with a bash script…

that said, there ARE some old heads here that can probably help…so,
hang around…(and check with forums.novell.com while waiting…)


palladium