I am using the tool monit
to start/stop a process. I have a java file as follows:
class test {
public void start()
{
//do something
}
public void stop()
{
//do something
}
}
I want to call the start func when a start command is issued from monit and vice versa. I cannot seem to find a good tutorial explaining what steps I need to take for executing the start and stop method. do I need to write a bash script? and monit will call the bash script which in turn calls the java method?