init config?
This commit is contained in:
1 parent
b4823eeb1a
commit
fec10a61d4
3 files changed
+61
-1
No files matched your search
@@ -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)?;
|
||||
|
||||
Reference in new issue
Block a user