make_vars #3

Merged
statzitz merged 3 commits from make_vars into main 2024-04-05 23:19:32 +02:00
Showing only changes of commit 989025fe69 - Show all commits

View file

@ -9,14 +9,25 @@ fn main() {
// def env variables.
let svdir_env = env::var("SVDIR");
//let svwait_env = env::var("SVWAIT");
let svwait_env = env::var("SVWAIT");
let svdir_var = match svdir_env {
Ok(var) => var,
Err(..) => "/run/runit/service".to_string(),
};
// TODO: check if directory exists
let svwait_var = match svwait_env {
Ok(env) => match env.parse::<i32>() {
Ok(var) => var,
Err(..) => 7,
},
Err(..) => 7,
};
dbg!(svdir_var);
dbg!(svwait_var);
// args