diff options
| author | tv <tv@krebsco.de> | 2026-10-26 20:16:41 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-26 20:16:41 +0100 |
| commit | f3eb7ee93ee2544cb5afa6a7ffcf88d580214fb9 (patch) | |
| tree | 541862582923c56a95e8f13d7a04beb8b8d97282 /src/main.rs | |
| parent | a3b7b4dd5bbee6bedaf0880732e26464cc1c8dec (diff) | |
detect broken htpasswd files during startup
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 99ee1b9..dee0a32 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,8 @@ async fn main() -> Result<()> { // First thing: until a handler is installed, SIGINT and SIGTERM kill the process on // the spot, and startup (spawning Mycelium, bootstrap) can take minutes. let stop = watch_for_shutdown().context("Installing signal handlers")?; + // A broken htpasswd will abort startup. + let auth_state = AuthState::new(&args.htpasswd)?; let mycelium_setup = { let spawn_config = MyceliumSpawnConfig { @@ -223,7 +225,6 @@ async fn main() -> Result<()> { ); swarm::state_file::update(&state, true).await; - let auth_state = AuthState::new(&args.htpasswd); let app = api::router(state.clone(), auth_state, args.debug_api); let listener = tokio::net::TcpListener::bind(args.bind_addr) |
