Files
dokku/plugins/nginx-vhosts/functions.go
Jose Diaz-Gonzalez d4b445985b refactor: consolidate property fetching for nginx plugin into golang codebase
Also update the documentation to include docs for all properties.
2024-02-06 00:42:48 -05:00

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
}