creating a RH9 startup service
I have a RedHat 9 server that runs a java appliction, which we start with a begin.bat file. I want to run the bat file at startup, so I added it to rc.local. It ran, but didn't work correctly. The reason is because we usually start it from the directory that the bat file is in, and it references some needed files within that same directory. How do I make the rc.loacal run the bat file from the directory its in, or where do I add the path to make it work?
Ultimately, I would like to be able to run it with a script at startup (with the start, stop, restart options) but have no idea how to write one. Basically, it just needs to run the .bat file to start, and kill the java process to stop.
Thanks in advance for any suggestions.
|