79 lines
1.5 KiB
Bash
79 lines
1.5 KiB
Bash
#!/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/
|
|
|
|
cd ..
|
|
# ------------------------
|
|
# 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/
|
|
cd ..
|
|
|
|
# ------------------------
|
|
# FritzBox Exporter
|
|
# ------------------------
|
|
|
|
# echo "Building fritzbox_exporter"
|
|
|
|
# git clone https://github.com/ndecker/fritzbox_exporter.git fritzbox_exporter
|
|
# cd fritzbox_exporter
|
|
|
|
# rm -r vendor
|
|
|
|
# go get -d ./...
|
|
# go build
|
|
|
|
# cp fritzbox_exporter $SCRIPTPATH/../exporter/fritzbox_exporter/
|
|
|
|
# cd ..
|
|
|
|
|
|
# ------------------------
|
|
# FritzBox Exporter
|
|
# ------------------------
|
|
echo "Building connectivity_exporter"
|
|
|
|
git clone https://git.stamm.me/Ops/ConnectivityExporter.git connectivity_exporter
|
|
cd connectivity_exporter
|
|
|
|
npm install
|
|
npm run build
|
|
|
|
cp connectivity-exporter $SCRIPTPATH/../exporter/connectivity_exporter/connectivity_exporter
|
|
|
|
cd ..
|
|
|
|
#go get gopkg.in/yaml.v2
|
|
|
|
#go run build.go
|
|
|