mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
enable auto setup by default
This commit is contained in:
parent
cdc64edc93
commit
44ae8ebae5
2 changed files with 6 additions and 1 deletions
|
|
@ -272,7 +272,7 @@ sources_root = "/path/to/sources" # path of the nextcloud sources. required
|
||||||
work_dir = "/path/to/temp/dir" # path to temporary directory. optional, defaults to "/tmp/haze"
|
work_dir = "/path/to/temp/dir" # path to temporary directory. optional, defaults to "/tmp/haze"
|
||||||
|
|
||||||
[auto_setup] # optional
|
[auto_setup] # optional
|
||||||
enabled = false # whether or not to automatically install nextcloud on `haze start`. optional, defaults to false
|
enabled = false # whether or not to automatically install nextcloud on `haze start`. enabled by default
|
||||||
username = "foo" # username for admin user during auto setup. optional, defaults to "admin"
|
username = "foo" # username for admin user during auto setup. optional, defaults to "admin"
|
||||||
password = "bar" # password for admin user during auto setup. optional, defaults to "admin"
|
password = "bar" # password for admin user during auto setup. optional, defaults to "admin"
|
||||||
post_setup = [# commands to execute after setup, defaults to []
|
post_setup = [# commands to execute after setup, defaults to []
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ impl From<RawHazeConfig> for HazeConfig {
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct HazeAutoSetupConfig {
|
pub struct HazeAutoSetupConfig {
|
||||||
|
#[serde(default = "default_auto_setup")]
|
||||||
pub enabled: bool,
|
pub enabled: bool,
|
||||||
#[serde(default = "default_auto_setup_username")]
|
#[serde(default = "default_auto_setup_username")]
|
||||||
pub username: String,
|
pub username: String,
|
||||||
|
|
@ -87,6 +88,10 @@ fn default_work_dir() -> Utf8PathBuf {
|
||||||
"/tmp/haze".into()
|
"/tmp/haze".into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_auto_setup() -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn default_auto_setup_username() -> String {
|
fn default_auto_setup_username() -> String {
|
||||||
"admin".to_string()
|
"admin".to_string()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue