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.