make home data use same enable home override config

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-09-08 14:12:53 +02:00
parent 6d4935c1f3
commit e3c081ba1a
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -70,6 +70,14 @@ func StorageHomeData(cfg *config.Config) *cli.Command {
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
// override driver enable home option with home config
if cfg.Reva.Storages.Home.EnableHome {
cfg.Reva.Storages.Common.EnableHome = true
cfg.Reva.Storages.EOS.EnableHome = true
cfg.Reva.Storages.Local.EnableHome = true
cfg.Reva.Storages.OwnCloud.EnableHome = true
cfg.Reva.Storages.S3.EnableHome = true
}
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
+7
View File
@@ -77,6 +77,13 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_HOME_DATA_TEMP_FOLDER"},
Destination: &cfg.Reva.StorageHomeData.TempFolder,
},
&cli.BoolFlag{
Name: "enable-home",
Value: true,
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.Home.EnableHome,
},
// Gateway