update get paths functions

This commit is contained in:
Hamidreza Ghavami
2023-04-14 04:44:04 +04:30
parent f9f8431dd2
commit 6d404e4b27

View File

@@ -14,6 +14,7 @@ import (
"runtime" "runtime"
"strings" "strings"
"time" "time"
"x-ui/config"
"x-ui/util/common" "x-ui/util/common"
"github.com/Workiva/go-datastructures/queue" "github.com/Workiva/go-datastructures/queue"
@@ -29,19 +30,19 @@ func GetBinaryName() string {
} }
func GetBinaryPath() string { func GetBinaryPath() string {
return "bin/" + GetBinaryName() return config.GetBinFolderPath() + "/" + GetBinaryName()
} }
func GetConfigPath() string { func GetConfigPath() string {
return "bin/config.json" return config.GetBinFolderPath() + "/config.json"
} }
func GetGeositePath() string { func GetGeositePath() string {
return "bin/geosite.dat" return config.GetBinFolderPath() + "/geosite.dat"
} }
func GetGeoipPath() string { func GetGeoipPath() string {
return "bin/geoip.dat" return config.GetBinFolderPath() + "/geoip.dat"
} }
func stopProcess(p *Process) { func stopProcess(p *Process) {