mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
config: fix loading commands args from env vars
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1961,6 +1961,11 @@ func getCommandConfigsFromEnv(idx int) {
|
||||
cfg.Env = env
|
||||
}
|
||||
|
||||
args, ok := lookupStringListFromEnv(fmt.Sprintf("SFTPGO_COMMAND__COMMANDS__%v__ARGS", idx))
|
||||
if ok {
|
||||
cfg.Args = args
|
||||
}
|
||||
|
||||
if cfg.Path != "" {
|
||||
if len(globalConf.CommandConfig.Commands) > idx {
|
||||
globalConf.CommandConfig.Commands[idx] = cfg
|
||||
|
||||
Reference in New Issue
Block a user