forked from NationTech/harmony
feat(harmony): add OPNSense shell command execution score
Introduces a new `OPNSenseShellCommandScore` to execute shell commands on an OPNSense device within the Harmony framework. This allows for custom command execution as part of the scoring and interpretation process, enhancing the flexibility and functionality of the system.
This commit is contained in:
@@ -181,6 +181,10 @@ impl Config {
|
||||
|
||||
Ok(OPNsense::from(xml))
|
||||
}
|
||||
|
||||
pub async fn run_command(&self, command: &str) -> Result<String, Error> {
|
||||
self.shell.exec(command).await
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user