feat(wip): docker ui only

This commit is contained in:
Jacky 2025-04-20 22:02:29 +08:00
parent c62fd25b2e
commit d4a4ed1e1c
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
43 changed files with 1269 additions and 372 deletions

View file

@ -35,13 +35,19 @@ func Enable(name string) (err error) {
}
// Test nginx config, if not pass, then disable the site.
output := nginx.TestConf()
output, err := nginx.TestConfig()
if err != nil {
return
}
if nginx.GetLogLevel(output) > nginx.Warn {
_ = os.Remove(enabledConfigFilePath)
return cosy.WrapErrorWithParams(ErrNginxTestFailed, output)
}
output = nginx.Reload()
output, err = nginx.Reload()
if err != nil {
return
}
if nginx.GetLogLevel(output) > nginx.Warn {
return cosy.WrapErrorWithParams(ErrNginxReloadFailed, output)
}