smooooth/bin/main.ml
2025-05-25 01:43:14 +10:00

15 lines
432 B
OCaml

let () =
Daemon.notify Daemon.State.Ready |> ignore;
let conf =
(try Yojson.Safe.from_file "/etc/smooooth.json" |> Smooooth.config_of_yojson
with Sys_error e ->
Printf.eprintf "Failed to open config - %s\n" e;
exit 1)
|> function
| Ok c -> c
| Error e ->
Printf.eprintf "Fatal error parsing config - %s\n" e;
exit 1
in
Lwt_main.run @@ Smooooth.main conf.path conf.blockers