diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-07 10:46:57 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-07 10:46:57 -0500 |
commit | 2a2596fe615e4f18e0aff02cc8a016fea0463849 (patch) | |
tree | c4a22ca4a195fa4ccdbfee80bae83a1a309548e5 /modules/setting | |
parent | 3f2e99962cd466da2eb09fe4719f258e6f7a39e4 (diff) | |
download | gitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.tar.gz gitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.zip |
able to disable SSH for #883
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index e79e6d6b96..6a205921b8 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -50,7 +50,8 @@ var ( Protocol Scheme Domain string HttpAddr, HttpPort string - SshPort int + DisableSSH bool + SSHPort int OfflineMode bool DisableRouterLog bool CertFile, KeyFile string @@ -209,7 +210,8 @@ func NewConfigContext() { Domain = sec.Key("DOMAIN").MustString("localhost") HttpAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0") HttpPort = sec.Key("HTTP_PORT").MustString("3000") - SshPort = sec.Key("SSH_PORT").MustInt(22) + DisableSSH = sec.Key("DISABLE_SSH").MustBool() + SSHPort = sec.Key("SSH_PORT").MustInt(22) OfflineMode = sec.Key("OFFLINE_MODE").MustBool() DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool() StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir) |