diff --git a/noxis-rs/src/options/config.rs b/noxis-rs/src/options/config.rs index acc8d81..92ac033 100644 --- a/noxis-rs/src/options/config.rs +++ b/noxis-rs/src/options/config.rs @@ -52,7 +52,7 @@ pub async fn get_actual_config(params : Arc) -> Option // * if no local conf -> loop and +inf getting conf from redis server // * if local conf -> once getting conf from redis server let config_path = params.config.to_str().unwrap_or_else(|| { - error!("Invalid character in config file. Config path was set as default"); + error!("Invalid character in config file. Config path was set to default"); "settings.json" }); info!("Configurating config module with params: no-remote-config={}, no-sub={}, local config path={:?}, remote server={}", params.no_remote_config, params.no_sub, params.config, params.remote_server_url); diff --git a/noxis-rs/src/options/preboot.rs b/noxis-rs/src/options/preboot.rs index 02e013f..10e030f 100644 --- a/noxis-rs/src/options/preboot.rs +++ b/noxis-rs/src/options/preboot.rs @@ -102,19 +102,26 @@ pub struct PrebootParams { } impl PrebootParams { - pub fn validate(self) -> Result { + pub fn validate(mut self) -> Result { if !self.socket_path.exists() && !self.no_hostagent { - return Err(Error::msg("Socket-file not found or Noxis can't read it. Cannot start")); + eprintln!("Error: Socket-file not found or Noxis can't read it. Socket-file was set to default"); + self.socket_path = PathBuf::from("/var/run/enode/hostagent.sock"); + // return Err(Error::msg("Socket-file not found or Noxis can't read it. Cannot start")); } // existing log dir if !self.log_to.exists() && !self.no_logs { - return Err(Error::msg("Log Directory Not Found or Noxis can't read it. Cannot start")); + eprintln!("Error: LogDir not found or Noxis can't read it. LogDir was set to default"); + self.log_to = PathBuf::from("./"); + // return Err(Error::msg("Log Directory Not Found or Noxis can't read it. Cannot start")); } // existing sock file if !self.config.exists() { - return Err(Error::msg("Local Config Not Found or Noxis can't read it. Cannot start")); + eprintln!("Error: Invalid character in config file. Config path was set to default"); + self.config = PathBuf::from("settings.json"); + // return Err(Error::msg("Local Config Not Found or Noxis can't read it. Cannot start")); } // redis server check + dbg!(&self); Ok(self) } }