feat: added custom nginx reload/restart cmd #140

This commit is contained in:
0xJacky 2023-07-16 22:13:48 +08:00
parent cc6a325ddd
commit 01611ef622
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
7 changed files with 75 additions and 144 deletions

View file

@ -141,20 +141,20 @@ func getLogPath(control *controlStruct) (logPath string, err error) {
logPath = directive.Params
case "error":
if settings.NginxLogSettings.ErrorLogPath == "" {
if settings.NginxSettings.ErrorLogPath == "" {
err = errors.New("settings.NginxLogSettings.ErrorLogPath is empty," +
" see https://github.com/0xJacky/nginx-ui/wiki/Nginx-Log-Configuration for more information")
return
}
logPath = settings.NginxLogSettings.ErrorLogPath
logPath = settings.NginxSettings.ErrorLogPath
default:
if settings.NginxLogSettings.AccessLogPath == "" {
if settings.NginxSettings.AccessLogPath == "" {
err = errors.New("settings.NginxLogSettings.AccessLogPath is empty," +
" see https://github.com/0xJacky/nginx-ui/wiki/Nginx-Log-Configuration for more information")
return
}
logPath = settings.NginxLogSettings.AccessLogPath
logPath = settings.NginxSettings.AccessLogPath
}
return