aports/config/telegraf/APKBUILD

117 lines
3.1 KiB
Plaintext

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-config.template
pkgver=2023.07.16.02
pkgrel=0
options="" # Disables defaults, enabling checks
checkdepends="telegraf"
source="
main.conf
secret
"
_modules="
base
unbound
redis
haproxy
rspamd
wireguard
postgresql
dovecot
postfix
murmur
"
for i in $_modules; do
source="$source $i.conf"
subpackages="$subpackages $pkgname-$i"
done
build() {
. secret
: "${POSTGRESQL_PASSWORD:?'PostgreSQL database access password missing'}"
cp postgresql.conf postgresql.conf-mod
rx_replace "POSTGRESQL_PASSWORD" "$POSTGRESQL_PASSWORD" "postgresql.conf-mod"
}
check() {
telegraf --config main.conf --config base.conf --test >/dev/null
}
package() {
rx_install main.conf
}
base() {
install_if="$pkgname"
_modinstall "base"
}
unbound() {
install_if="$pkgname redxen-config-unbound-rctrl"
_modinstall "unbound"
}
postgresql() {
install_if="$pkgname redxen-config-postgresql"
_rx_installdir="$_rx_installdir/module" rx_install "postgresql.conf-mod" "postgresql.conf"
}
redis() {
_commonmod
}
haproxy() {
_commonmod
}
rspamd() {
_commonmod
}
wireguard() {
_commonmod
}
dovecot() {
_commonmod
}
postfix() {
_commonmod
}
murmur() {
_commonmod
}
_commonmod() {
modname="${subpkgname##$pkgname-}"
install_if="$pkgname redxen-config-$modname"
_modinstall "$modname"
}
_modinstall() {
_rx_installdir="$_rx_installdir/module" rx_install "$1".conf
}
sha512sums="
5a0f1dab5c4887700f7f29eeb0d1be28690737f1689a12e67861be4c0bb8276ece8fcb279983e6e3bc5484bd6aa932b663d6ff775c68e33c1190fcdbaa3b1889 main.conf
3f01fceee3333cb4f1723333d2e8f7c77e2cf2d2d5a6d7679ebcdb4edda23db22ebe1bd4eeec1a92a0245ef81b6a0849a4b9341fa66092ea82149100d189e037 secret
4ce0069857852d36bf2db5ae8fad793afc864a4e7d5629a627c92db11c46baeb1c53b5ad85bf40340e245c6cd03a92bd5ac1b6f381e315638a15f04d2490b53c base.conf
5a81b295f17189115fe93d1d68d94181aaab32dfcdd3e4d0480991c515d0cec57cb58bac354b893a5109a9e62d400a278489c9d64b997968ad8f326e02c7ddb1 unbound.conf
a4bc80850c94291d00b2ad56e50216ab36515bcc176b3c5678b24c3d5a3740b9de9006df8e37e42942a50227e6b27321d267e27decffbf6d9a37755d3224121e redis.conf
5d0aefde08abf5dedc01521a8b711d85bdfc7ff3cd6d8ac2176ae5c2914d8579fb7e3f4ede7ebff5989b2a196c8019b6869c2133375239643b1cdbadb5048ebf haproxy.conf
0e5e8282a77553cf75b3184367486d37f4dd6e6ed5a216f2ca5b94f4fe7b151565eb5d9fc35f5eadc154da41aa39f0f7979ded054be9da94b981326ca13c6b8f rspamd.conf
3f6d05082d4e01fb7498c82fb92fb479c5766148c9dcfd118d248ceaf6838f4794b940a8fcff0ec6020000806c6418f93e5aa60cbf32fd826fa4f9870f925ba7 wireguard.conf
cd891003216a1f0b1d7718b0cda39f798984a5a0ffae11b87edc933f2a96c15255cddaa19e8bb5514c7e1c2478c46d5042043a4af6e21805188863e29606daab postgresql.conf
08dfc71b64e1f8b413bef098e0b505b21d51622573fd58a0d2331bd85e94b98b5be1da08137c820c5d4f0617ba450d73d9db1c7386e69e510e8b4a9c7163e358 dovecot.conf
e08b6d978c87e0e73a88c7a8813ef7cebaed5fefe2f523120bb52e4f31ef113da5c216b566791a1f6b699a753362e31c7cbec294189e222110ffd2c26181272f postfix.conf
b2cda0f8ccebe3bcebbdaa14211e06b6ee261eb4f5c482d818871f1b3b6a915581b44284f201707f425cfd96be45a3fc2dd74758820211704bde962074816088 murmur.conf
"