How to make a daemon which will accept arbitrary commands

Posted by Jono on Stack Overflow See other posts from Stack Overflow or by Jono
Published on 2010-12-21T23:33:23Z Indexed on 2010/12/21 23:54 UTC
Read the original article Hit count: 226

Filed under:
|
|

Right now the program can be launched in a linux terminal. Once running you can type various commands and the program will do stuff on the machine until the user quits.

I would like to make the program into a service that the user runs and it goes to the background. Then the user should be able to make commands to it. Like start and stop, and write something to a log and whatever else my program does. Note that I need to send it arbitrary commands that my program will handle, not just start and stop. Maybe this means it is no longer a daemon - I dont know. How do I do this?

Also, if this is not too hard, I would like to be able to run multiple instances of this service. But it is not essential.

© Stack Overflow or respective owner

Related posts about java

Related posts about linux