|
|
|
@ -10,7 +10,7 @@ pub struct App {
|
|
|
|
|
/// path/command to run
|
|
|
|
|
pub command: String,
|
|
|
|
|
/// arguments
|
|
|
|
|
pub args: Vec<String>,
|
|
|
|
|
pub args: Option<Vec<String>>,
|
|
|
|
|
/// should the app be restarted if it exits successfully
|
|
|
|
|
pub restart_on_success: Option<bool>,
|
|
|
|
|
/// should the app be restarted if it exits unsuccessfully
|
|
|
|
@ -29,7 +29,8 @@ impl App {
|
|
|
|
|
info!("starting application {}", &self.name);
|
|
|
|
|
|
|
|
|
|
let mut command = Command::new(&self.command);
|
|
|
|
|
command.args(&self.args);
|
|
|
|
|
let args = self.args.as_ref();
|
|
|
|
|
command.args(args.unwrap_or(&Vec::new()));
|
|
|
|
|
|
|
|
|
|
match command.output() {
|
|
|
|
|
Ok(output) => {
|
|
|
|
|