Java servers as a service
I have a Java based RuneScape server that I have been running under Windows for some time now without issue. At one point I decided to migrate the server over to my linux box, and it worked perfectly, accept for the fact that I only have SSH to manage the server, and I need two SSH windows open to get the server to run. This is because the server is comprised of two separate programs, one to run the server itself, and one to manage the database.
I was thinking it would be possible to run both of the programs as a service. I tried to configure them in init.d but I had no luck there. I understand the concept behind the init.d scripts but I just can't seem to get the code right. The command to start the server(s) are Code:
ant /etc/rscd/runls Code:
ant /etc/rscd/runserver Both servers use apache ant to run. If somebody could enlighten me on how to run these programs as services I would be really happy. Thanks in advance. |
First when, you starting them by hand, you could append "&" at the end like this:
Code:
# ant /etc/rscd/runls & For how to start them as a service, look for file "rc.local", somewhere in /etc: Code:
# cd /etc Code:
exec <full path to ant>/ant /etc/rscd/runls & |
All times are GMT -5. The time now is 12:49 AM. |