mirror of
https://github.com/dokku/dokku.git
synced 2025-12-16 12:07:45 +01:00
27 lines
343 B
Go
27 lines
343 B
Go
package nginxvhosts
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func getLogRoot() string {
|
|
logRoot := "/var/log/nginx"
|
|
if isOpenRestyInstalled() {
|
|
logRoot = "/var/log/openresty"
|
|
}
|
|
return logRoot
|
|
}
|
|
|
|
func isOpenRestyInstalled() bool {
|
|
fi, err := os.Stat("/usr/bin/openresty")
|
|
if err != nil {
|
|
return false
|
|
}
|
|
|
|
if fi.IsDir() {
|
|
return false
|
|
}
|
|
|
|
return true
|
|
}
|