summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorFluf <36822577+flufmonster@users.noreply.github.com>2018-06-09 18:35:14 -0400
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-06-09 18:35:14 -0400
commitf54626df0b8aed0c3374cb6caafdb49aa4198006 (patch)
tree9cbfcfaa6a438a64b6320c11eab2b485f10d1971 /cmd
parent9033eaeec1a082bd03a726daaccb85cb64b364d1 (diff)
downloadgitea-f54626df0b8aed0c3374cb6caafdb49aa4198006.tar.gz
gitea-f54626df0b8aed0c3374cb6caafdb49aa4198006.zip
Add config path as an optional flag when changing pass via CLI (#4184)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index 6c79141eab..4fb0810c66 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -73,6 +73,11 @@ var (
Value: "",
Usage: "New password to set for user",
},
+ cli.StringFlag{
+ Name: "config, c",
+ Value: "custom/conf/app.ini",
+ Usage: "Custom configuration file path",
+ },
},
}
@@ -123,6 +128,10 @@ func runChangePassword(c *cli.Context) error {
return err
}
+ if c.IsSet("config") {
+ setting.CustomConf = c.String("config")
+ }
+
if err := initDB(); err != nil {
return err
}