daemonize Build Status Latest Version

daemonize is a library for writing system daemons. Inspired by the Python library thesharp/daemonize.

The documentation is located at http://knsd.github.io/daemonize/.

Usage example:

```rust

[macro_use] extern crate log;

extern crate daemonize;

use daemonize::{Daemonize};

fn main() { let daemonize = Daemonize::new().pidfile("/tmp/test.pid") .chownpidfile(true) .workingdirectory("/tmp") .user("nobody") .group("daemon") // Group name .group(2) // Or group id .privilegedaction(|| "Executed before drop privileges"); match daemonize.start() { Ok() => info!("Success, daemonized"), Err(e) => error!("{}", e), } } ```