Add Dovecot exporter
This commit is contained in:
43
build/build.sh
Normal file
43
build/build.sh
Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
||||
cd $SCRIPTPATH
|
||||
|
||||
[ -d "./temp" ] && rm -r ./temp
|
||||
|
||||
mkdir ./temp
|
||||
|
||||
cd temp
|
||||
|
||||
# ------------------------
|
||||
# Dovecot Exporter
|
||||
# ------------------------
|
||||
echo "Building dovecot_exporter"
|
||||
|
||||
git clone https://github.com/kumina/dovecot_exporter.git dovecot_exporter
|
||||
cd dovecot_exporter
|
||||
|
||||
go get -d ./...
|
||||
go build --ldflags '-extldflags "-static"'
|
||||
|
||||
cp dovecot_exporter $SCRIPTPATH/../exporter/dovecot_exporter/
|
||||
|
||||
# ------------------------
|
||||
# Postfix Exporter
|
||||
# ------------------------
|
||||
echo "Building postfix_exporter"
|
||||
|
||||
git clone https://github.com/kumina/postfix_exporter.git postfix_exporter
|
||||
cd postfix_exporter
|
||||
|
||||
go get -d ./...
|
||||
go build
|
||||
|
||||
cp postfix_exporter $SCRIPTPATH/../exporter/postfix_exporter/
|
||||
|
||||
|
||||
#go get gopkg.in/yaml.v2
|
||||
|
||||
#go run build.go
|
||||
|
Reference in New Issue
Block a user