Skip to content

rjzfrj/Daemon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a really simple Java library for starting, stopping, and controlling daemon processes written in Java on Unix/Linux. To allow your program to run as a daemon, just link this library into your program. The library does not use native code, nor does it require external shell scripts. All OS-dependent functionality is implemented by executing subprocesses, specifically sh, ps, and mkfifo.

The intended use is to make it easy to build deployable jar files for server or other long-running applications. For example, you might use this library as part of packaging your Java web application into a single jar file (using embedded Jetty): this library allows the application to run as a background process, handle runtime configuration commands, and to shut itself down cleanly. Once everything is set up you can then do cool things like the following:

# Start the application in the background
java -jar myApp.jar start

# Send a command (purgecache) to the running application
java -jar myApp.jar purgecache

# Shut down the running application
java -jar myApp.jar shutdown

Detailed information can be found at the wiki.

The library is open source distributed under the MIT license.

David Hovemeyer [email protected]

About

Support for starting, stopping, and controlling Java daemon processes on Unix/Linux

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors