Checking in daemonization, writing to a logfile, and saving the pid
[vsys.git] / globals.ml
1 (** Some things that didn't fit in elsewhere *)
2 let backend = ref ""
3 let debug = ref true
4 let vsys_version = "0.5"
5 let nochroot = ref false
6 let conffile = ref ""
7 let pid_filepath = ref "/var/run/vsys.pid"
8 let log_filepath = ref "/var/log/vsys"
9
10 let logfd = open_out_gen [Open_append;Open_creat] 0o644 !log_filepath
11 type result = Success | Failed
12
13 type fname_and_fd = string option * Unix.file_descr
14
15 (* Relative path, never precededed by a '/' *)
16 type relpath = Relpath of string
17
18 exception Bad_path 
19 exception Bug