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:
parent
8a48b2e3c4
commit
25ea32820c
3 changed files with 11 additions and 0 deletions
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 } => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue