mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
修复修改密码会重启服务
This commit is contained in:
@@ -95,17 +95,17 @@ func Save(setting *Setting) error {
|
||||
reload = true
|
||||
}
|
||||
s.TableName = "settings"
|
||||
if setting.Timeout != 0 {
|
||||
if setting.Timeout != 0 && setting.Timeout != public.TimeOut {
|
||||
s.Where("key = 'timeout'", []interface{}{}).Update(map[string]interface{}{"value": setting.Timeout})
|
||||
public.TimeOut = setting.Timeout
|
||||
restart = true
|
||||
}
|
||||
if setting.Secure != "" {
|
||||
if setting.Secure != "" && setting.Secure != public.Secure {
|
||||
s.Where("key = 'secure'", []interface{}{}).Update(map[string]interface{}{"value": setting.Secure})
|
||||
public.TimeOut = setting.Timeout
|
||||
restart = true
|
||||
}
|
||||
if setting.Https == "1" {
|
||||
if setting.Https == "1" && setting.Https != public.GetSettingIgnoreError("https") {
|
||||
if setting.Key == "" || setting.Cert == "" {
|
||||
return fmt.Errorf("key or cert is empty")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user