Skip to content

Commit 1613570

Browse files
committed
Add variables
1 parent 66bb362 commit 1613570

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

main.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ import (
5151
func main() {
5252
var (
5353
hibernate = flag.Bool("hibernate", false, "start hibernated")
54+
version = "x.x.x-dev" //don't modify it, Jenkins will take care
55+
revision = "xxxxxxxx" //don't modify it, Jenkins will take care
5456
)
5557

5658
flag.Parse()
@@ -85,12 +87,17 @@ func main() {
8587
shutdown := func() {
8688
os.Exit(0)
8789
}
88-
go setupSystray(*hibernate, "XXX", "YYY", restart, shutdown)
8990

90-
// Start service
91-
if err := service.ListenAndServe(":9000"); err != nil {
92-
service.LogError("startup", "err", err)
91+
if !*hibernate {
92+
go func() {
93+
// Start service
94+
if err := service.ListenAndServe(":9000"); err != nil {
95+
service.LogError("startup", "err", err)
96+
}
97+
}()
9398
}
99+
100+
setupSystray(*hibernate, version, revision, restart, shutdown)
94101
}
95102

96103
// RestartFunc launches itself before exiting. It works because we pass an option to tell it to wait for 5 seconds, which gives us time to exit and unbind from serial ports and TCP/IP

0 commit comments

Comments
 (0)