2017-09-21 08:38:05 +00:00
|
|
|
package config
|
|
|
|
|
2017-12-01 13:01:46 +00:00
|
|
|
import (
|
2018-03-26 06:55:38 +00:00
|
|
|
"path"
|
|
|
|
|
2017-12-01 13:01:46 +00:00
|
|
|
ooccp "git.loafle.net/overflow/overflow_commons_go/config/probe"
|
2017-09-22 09:20:07 +00:00
|
|
|
)
|
|
|
|
|
2017-09-29 12:30:27 +00:00
|
|
|
var (
|
|
|
|
ConfigDir *string
|
|
|
|
ConfigFilePath *string
|
|
|
|
EncryptionKey *string
|
2017-09-28 10:09:33 +00:00
|
|
|
|
2017-12-01 13:01:46 +00:00
|
|
|
Config *ooccp.Config
|
|
|
|
)
|
2018-03-26 06:55:38 +00:00
|
|
|
|
|
|
|
func RootDirPath() string {
|
|
|
|
return Config.Paths["root"]
|
|
|
|
}
|
|
|
|
|
|
|
|
func BinDirPath() string {
|
|
|
|
return path.Join(RootDirPath(), ooccp.PathBin)
|
|
|
|
}
|
|
|
|
|
|
|
|
func ConfigDirPath() string {
|
|
|
|
return path.Join(RootDirPath(), ooccp.PathConfig)
|
|
|
|
}
|
|
|
|
|
2018-03-26 15:14:19 +00:00
|
|
|
func SensorConfigDirPath() string {
|
|
|
|
return path.Join(RootDirPath(), ooccp.PathSensorConfig)
|
|
|
|
}
|
|
|
|
|
2018-03-26 06:55:38 +00:00
|
|
|
func JREDirPath() string {
|
|
|
|
return path.Join(RootDirPath(), ooccp.PathJRE)
|
|
|
|
}
|
|
|
|
|
|
|
|
func JavaBinPath() string {
|
|
|
|
return path.Join(JREDirPath(), "bin", "java")
|
|
|
|
}
|
|
|
|
|
|
|
|
func LogsDirPath() string {
|
|
|
|
return path.Join(RootDirPath(), ooccp.PathLogs)
|
|
|
|
}
|
|
|
|
|
|
|
|
func PIDDirPath() string {
|
|
|
|
return path.Join(RootDirPath(), ooccp.PathPID)
|
|
|
|
}
|