I'm trying to make an web service which can also get commands via shell. So I want to make this app work like a daemon. So my question is how can I get arguments passed to shell while web service runs in the background? I can make script which starts this app as a daemon and give it a name but how can i get arguments in java passed later on?
EX. mydaemon add -stream somepage.com -channel channelName -start 2014-09-19 20:00:00 -end 2014-09-19 20:45:00
I can start a new thread in main method which gets system.in but will this get stuff sent to PID of my app. Btw, if this can make a change - I'm using Spring Boot in my app.