29 lines
770 B
Go
29 lines
770 B
Go
package bin_path
|
|
|
|
import (
|
|
"git.inspur.com/sbg-jszt/cfn/cfn-schedule-agent/config"
|
|
"git.inspur.com/sbg-jszt/cfn/cfn-schedule-agent/pkg/utils"
|
|
"path/filepath"
|
|
)
|
|
|
|
var (
|
|
BINDIR = "/root/cfn-schedule-agent/bin"
|
|
UPGRADEDIR = "/root/cfn-schedule-agent/upgrade"
|
|
ASSETCONFIGDIR = ""
|
|
AGENTLOG = ""
|
|
AGENTUPGRADELOG = ""
|
|
TELEGRAFLOG = ""
|
|
UPGRADEPLAN = ""
|
|
)
|
|
|
|
func init() {
|
|
BINDIR, _ = utils.GetCurrentPath()
|
|
UPGRADEDIR = filepath.Join(BINDIR, "../upgrade")
|
|
AGENTUPGRADELOG = filepath.Join(UPGRADEDIR, "/upgrade.log")
|
|
TELEGRAFLOG = filepath.Join(BINDIR, "/data-collector/telegraf/log/", "telegraf.log")
|
|
AGENTLOG = filepath.Join(BINDIR, "/logs/", config.Config.Logger.Filename)
|
|
|
|
UPGRADEPLAN = filepath.Join(UPGRADEDIR, "/upgradeplan")
|
|
|
|
}
|