atagen

roundabout

public
Star0
Watch0
fdad58f8133a77a20c44d0e1472cb73a5128ef2c
1
ssh://brewery@pls.lobotomise.me:33/atagen/roundabout.git
src/main.rsRust32 lines703 B
1
mod artifacts;
2
mod cli;
3
mod client;
4
mod config;
5
mod daemon;
6
mod history;
7
mod hook;
8
mod paths;
9
mod proto;
10
mod run;
11
mod sched;
12
mod store;
13
mod sys;
14
#[cfg(target_os = "linux")]
15
mod systemd;
16
mod units;
17
18
use pound::Parse;
19
20
fn main() {
21
    #[cfg(target_os = "linux")]
22
    if let Some(code) = systemd::exec() {
23
        std::process::exit(code);
24
    }
25
    // a typo must not exit 2, that's a blocking pretooluse verdict and would
26
    // wall off every bash call in every session
27
    let cfg = config::Config::load().unwrap_or_else(|e| {
28
        eprintln!("roundabout: bad config, using defaults. {e}");
29
        config::Config::default()
30
    });
31
    std::process::exit(cli::dispatch(&cfg, cli::Rabt::parse()));
32
}