1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

add support for post-setup commands

This commit is contained in:
Robin Appelman 2022-01-28 15:27:29 +01:00
commit 25ea32820c
3 changed files with 11 additions and 0 deletions

View file

@ -22,6 +22,8 @@ pub struct HazeAutoSetupConfig {
pub username: String,
#[serde(default = "default_auto_setup_password")]
pub password: String,
#[serde(default)]
pub post_setup: Vec<String>,
}
impl Default for HazeAutoSetupConfig {
@ -30,6 +32,7 @@ impl Default for HazeAutoSetupConfig {
enabled: false,
username: default_auto_setup_username(),
password: default_auto_setup_password(),
post_setup: Vec::default(),
}
}
}

View file

@ -141,6 +141,11 @@ async fn main() -> Result<()> {
.await?;
}
}
for cmd in &config.auto_setup.post_setup {
cloud
.exec(&mut docker, cmd.split(" ").collect(), false)
.await?;
}
}
}
HazeArgs::Stop { filter } => {