I wrote a Daemon by using the apache commons sample code:
public class LockDaemon implements Daemon {
@Override
public void init(DaemonContext context) throws DaemonInitException, Exception {
LogManager.getLogger().info("initialized with arguments {}", context.getArguments());
}
@Override
public void start() throws Exception {
LogManager.getLogger().info("Start called");
}
@Override
public void stop() throws Exception {
LogManager.getLogger().info("Stop called");
}
@Override
public void destroy() {
}
}
Unfortunately the example does not mention how to install this class with procrun. Procrun needs a static "Start Method", which I do not have when using the code above.
So which start (and stop) method needs to be set for procrun to make the code above work?