mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-05-31 16:39:51 +08:00
24 lines
568 B
Go
24 lines
568 B
Go
package site
|
|
|
|
import (
|
|
"github.com/0xJacky/Nginx-UI/internal/config"
|
|
"github.com/0xJacky/Nginx-UI/internal/nginx"
|
|
)
|
|
|
|
func ResolveAvailablePath(name string) (string, error) {
|
|
return config.ResolveConfPathInDir("sites-available", name)
|
|
}
|
|
|
|
func ResolveEnabledPath(name string) (string, error) {
|
|
return config.ResolveConfPathInDirPreserveLeaf("sites-enabled", name)
|
|
}
|
|
|
|
func resolveEnabledSymlinkPath(name string) (string, error) {
|
|
enabledPath, err := ResolveEnabledPath(name)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
|
|
return nginx.GetConfSymlinkPath(enabledPath), nil
|
|
}
|