1
0
Fork 0

Compare commits

...

2 Commits

3 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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')

View File

@ -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
}