init config?

This commit is contained in:
lda committed 2026-04-11 16:23:31 +07:00
1 parent b4823eeb1a
commit fec10a61d4
3 files changed
+61 -1

No files matched your search

+8
View File
@@ -7,6 +7,14 @@ use crate::cli::ServeArgs;
use crate::{config, session};
pub async fn serve(args: ServeArgs) -> Result<()> {
if !args.config.exists() {
anyhow::bail!(
"agent config {} not found. Run `wakey-agent enroll --server-url <url> --enroll-token <token>` or `wakey-agent init-config --config {}` first",
args.config.display(),
args.config.display()
);
}
write_pid_file(&args.pid_file)?;
let mut cfg = config::load_config(&args.config)?;