atagen

roundabout

public
Star0
Watch0
caac091f257ad8d53409925aac0d377b716994f8
1
ssh://brewery@pls.lobotomise.me:33/atagen/roundabout.git

Blame: src/main.rs

6f5b84fad3efatagen2026-09-27 03:59 UTC1
mod artifacts;
6f5b84fad3efatagen2026-09-27 03:59 UTC2
mod cli;
6f5b84fad3efatagen2026-09-27 03:59 UTC3
mod client;
6f5b84fad3efatagen2026-09-27 03:59 UTC4
mod config;
6f5b84fad3efatagen2026-09-27 03:59 UTC5
mod daemon;
6f5b84fad3efatagen2026-09-27 03:59 UTC6
mod history;
6f5b84fad3efatagen2026-09-27 03:59 UTC7
mod hook;
6f5b84fad3efatagen2026-09-27 03:59 UTC8
mod paths;
6f5b84fad3efatagen2026-09-27 03:59 UTC9
mod proto;
6f5b84fad3efatagen2026-09-27 03:59 UTC10
mod run;
6f5b84fad3efatagen2026-09-27 03:59 UTC11
mod sched;
6f5b84fad3efatagen2026-09-27 03:59 UTC12
mod store;
6f5b84fad3efatagen2026-09-27 03:59 UTC13
mod sys;
caac091f257aatagen2026-10-04 11:41 UTC14
#[cfg(target_os = "linux")]
caac091f257aatagen2026-10-04 11:41 UTC15
mod systemd;
6f5b84fad3efatagen2026-09-27 03:59 UTC16
mod units;
6f5b84fad3efatagen2026-09-27 03:59 UTC17
6f5b84fad3efatagen2026-09-27 03:59 UTC18
use pound::Parse;
6f5b84fad3efatagen2026-09-27 03:59 UTC19
6f5b84fad3efatagen2026-09-27 03:59 UTC20
fn main() {
caac091f257aatagen2026-10-04 11:41 UTC21
    #[cfg(target_os = "linux")]
caac091f257aatagen2026-10-04 11:41 UTC22
    if let Some(code) = systemd::exec() {
caac091f257aatagen2026-10-04 11:41 UTC23
        std::process::exit(code);
caac091f257aatagen2026-10-04 11:41 UTC24
    }
56a853ebf254atagen2026-09-27 03:59 UTC25
    // a typo must not exit 2, that's a blocking pretooluse verdict and would
56a853ebf254atagen2026-09-27 03:59 UTC26
    // wall off every bash call in every session
56a853ebf254atagen2026-09-27 03:59 UTC27
    let cfg = config::Config::load().unwrap_or_else(|e| {
56a853ebf254atagen2026-09-27 03:59 UTC28
        eprintln!("rabt: bad config, using defaults. {e}");
56a853ebf254atagen2026-09-27 03:59 UTC29
        config::Config::default()
56a853ebf254atagen2026-09-27 03:59 UTC30
    });
6f5b84fad3efatagen2026-09-27 03:59 UTC31
    std::process::exit(cli::dispatch(&cfg, cli::Rabt::parse()));
6f5b84fad3efatagen2026-09-27 03:59 UTC32
}