mirror of
https://github.com/pushbits/server.git
synced 2025-07-29 14:28:01 +02:00
Print version upon startup
This commit is contained in:
parent
1a31b91c18
commit
3a483526b6
2 changed files with 10 additions and 2 deletions
|
@ -14,6 +14,8 @@ import (
|
|||
"github.com/pushbits/server/internal/runner"
|
||||
)
|
||||
|
||||
var Version string
|
||||
|
||||
func setupCleanup(db *database.Database, dp *dispatcher.Dispatcher) {
|
||||
c := make(chan os.Signal)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
|
@ -42,7 +44,11 @@ func setupCleanup(db *database.Database, dp *dispatcher.Dispatcher) {
|
|||
|
||||
// @securityDefinitions.basic BasicAuth
|
||||
func main() {
|
||||
log.Println("Starting PushBits.")
|
||||
if len(Version) == 0 {
|
||||
log.Panic("Version not set")
|
||||
} else {
|
||||
log.Printf("Starting PushBits %s", Version)
|
||||
}
|
||||
|
||||
c := configuration.Get()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue