mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
enhance (network): interface detection logic
This commit is contained in:
parent
f0ba80a2a7
commit
4b44baf92c
2 changed files with 46 additions and 26 deletions
|
@ -62,15 +62,6 @@ func (c *ConfigPayload) mkCertificateDir() (err error) {
|
|||
return nil
|
||||
}
|
||||
|
||||
if _, err = os.Stat(c.CertificateDir); os.IsNotExist(err) {
|
||||
err = os.MkdirAll(c.CertificateDir, 0755)
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
// For windows, replace * with # (issue #403)
|
||||
c.CertificateDir = strings.ReplaceAll(c.CertificateDir, "*", "#")
|
||||
if _, err = os.Stat(c.CertificateDir); os.IsNotExist(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue