mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
enhance: do not save settings from env to app.ini #594
This commit is contained in:
parent
b64f71e13a
commit
4d1adac8c4
2 changed files with 6 additions and 11 deletions
|
@ -1,13 +1,13 @@
|
||||||
package settings
|
package settings
|
||||||
|
|
||||||
type Logrotate struct {
|
type Logrotate struct {
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
CMD string `json:"cmd" protected:"true"`
|
CMD string `json:"cmd" protected:"true"`
|
||||||
Interval int `json:"interval"`
|
Interval int `json:"interval"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var LogrotateSettings = Logrotate{
|
var LogrotateSettings = Logrotate{
|
||||||
Enabled: false,
|
Enabled: false,
|
||||||
CMD: "logrotate /etc/logrotate.d/nginx",
|
CMD: "logrotate /etc/logrotate.d/nginx",
|
||||||
Interval: 1440, // 24 hours
|
Interval: 1440, // 24 hours
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,11 +82,6 @@ func Setup() {
|
||||||
if AuthSettings.MaxAttempts <= 0 {
|
if AuthSettings.MaxAttempts <= 0 {
|
||||||
AuthSettings.MaxAttempts = 10
|
AuthSettings.MaxAttempts = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
err = Save()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("settings.Setup: %v\n", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func MapTo() {
|
func MapTo() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue