Add internal function for telegraf version (#4828)
This commit is contained in:
committed by
Daniel Nelson
parent
709eadffc4
commit
7bb219222a
@@ -326,6 +326,16 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
shortVersion := version
|
||||
if shortVersion == "" {
|
||||
shortVersion = "unknown"
|
||||
}
|
||||
|
||||
// Configure version
|
||||
if err := internal.SetVersion(shortVersion); err != nil {
|
||||
log.Println("Telegraf version already configured to: " + internal.Version())
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" && !(*fRunAsConsole) {
|
||||
svcConfig := &service.Config{
|
||||
Name: *fServiceName,
|
||||
|
||||
Reference in New Issue
Block a user