Compare commits
2 Commits
fd0b2a145c
...
de180ef514
Author | SHA1 | Date |
---|---|---|
Alexander Andreev | de180ef514 | |
Alexander Andreev | 97439561ee |
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ SYSDDIR=${SYSDDIR_:/%=%}
|
|||
DESTDIR:=
|
||||
PREFIX:=/usr/local
|
||||
|
||||
VERSION:=3.0.0
|
||||
VERSION:=3.1.0
|
||||
|
||||
FLAGS:=-buildmode=pie -modcacherw -mod=readonly -trimpath
|
||||
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -tags netgo
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Maintainer: Alexander "Arav" Andreev <me@arav.su>
|
||||
pkgname=httpprocprobed
|
||||
pkgver=3.0.0
|
||||
pkgver=3.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="HTTPProcProbeD hands out an HTTP endpoint to get if processes are running."
|
||||
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
||||
|
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
@ -23,5 +24,15 @@ func LoadConfiguration(path string) (conf *Configuration, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
for i := 0; i < len(conf.Processes); i++ {
|
||||
if conf.Processes[i].Process == "" {
|
||||
return nil, fmt.Errorf("an empty process field found")
|
||||
}
|
||||
|
||||
if conf.Processes[i].Alias == "" {
|
||||
conf.Processes[i].Alias = conf.Processes[i].Process
|
||||
}
|
||||
}
|
||||
|
||||
return conf, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue