let strict_config = ref false in
let config_errors = ref [] in
let uuid = ref "" in
+ let daemonize = ref true in
let usage_msg = sprintf "usage: %s [--config <config>] [--uuid <uuid>] [<config>-deprecated]" Sys.argv.(0) in
Arg.parse [
("--config", Arg.Set_string config, "Set config file to be used");
("--uuid", Arg.Set_string uuid, "Force uuid to be the one specified");
("--strict-config", Arg.Set strict_config, "Error out if the config contains errors");
+ ("--no-daemonize", Arg.Clear daemonize, "leave the daemon in foreground");
] (fun s -> anon := s :: !anon) usage_msg;
if !config = "" && List.length !anon > 0 then (
verify_config cfg;
- if cfg.daemonize then
+ if !daemonize then
Unixext.daemonize ();
if cfg.debug then (