2020-11-20 16:31:49 +00:00
|
|
|
# Contributor: Alex Denes <caskd@redxen.eu>
|
|
|
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
|
|
|
|
2021-06-01 23:17:41 +00:00
|
|
|
. ../APKBUILD-config.template
|
2021-02-07 21:36:32 +00:00
|
|
|
|
2021-06-06 14:26:46 +00:00
|
|
|
pkgver=2021.06.06.03
|
2021-06-06 18:24:09 +00:00
|
|
|
pkgrel=1
|
|
|
|
options="" # Disables defaults, enabling checks
|
2021-06-01 23:17:41 +00:00
|
|
|
checkdepends="telegraf"
|
2021-06-06 14:26:46 +00:00
|
|
|
source="
|
|
|
|
main.conf
|
|
|
|
secret
|
|
|
|
"
|
2021-06-01 23:17:41 +00:00
|
|
|
_modules="
|
|
|
|
base
|
|
|
|
unbound
|
|
|
|
redis
|
|
|
|
haproxy
|
|
|
|
rspamd
|
|
|
|
wireguard
|
2021-06-06 14:26:46 +00:00
|
|
|
postgresql
|
2021-06-01 23:17:41 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
for i in $_modules; do
|
|
|
|
source="$source $i.conf"
|
|
|
|
subpackages="$subpackages $pkgname-$i"
|
|
|
|
done
|
2020-11-20 16:31:49 +00:00
|
|
|
|
2021-06-06 14:26:46 +00:00
|
|
|
build() {
|
|
|
|
. secret
|
2021-06-06 18:24:09 +00:00
|
|
|
: "${POSTGRESQL_PASSWORD:?'PostgreSQL database access password missing'}"
|
|
|
|
|
2021-06-06 14:26:46 +00:00
|
|
|
cp postgresql.conf postgresql.conf-mod
|
|
|
|
rx_replace "POSTGRESQL_PASSWORD" "$POSTGRESQL_PASSWORD" "postgresql.conf-mod"
|
|
|
|
}
|
|
|
|
|
2020-11-20 16:31:49 +00:00
|
|
|
check() {
|
2021-06-01 23:17:41 +00:00
|
|
|
telegraf --config main.conf --config base.conf --test >/dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
rx_install main.conf
|
|
|
|
}
|
|
|
|
|
|
|
|
base() {
|
|
|
|
install_if="$pkgname"
|
2021-06-06 14:26:46 +00:00
|
|
|
_modinstall "base"
|
2021-06-01 23:17:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
unbound() {
|
|
|
|
install_if="$pkgname redxen-config-unbound-rctrl"
|
2021-06-06 14:26:46 +00:00
|
|
|
_modinstall "unbound"
|
|
|
|
}
|
|
|
|
|
|
|
|
postgresql() {
|
|
|
|
install_if="$pkgname redxen-config-postgresql"
|
|
|
|
_rx_installdir="$_rx_installdir/module" rx_install "postgresql.conf-mod" "postgresql.conf"
|
2021-06-01 23:17:41 +00:00
|
|
|
}
|
|
|
|
|
2021-06-06 14:26:46 +00:00
|
|
|
|
2021-06-01 23:17:41 +00:00
|
|
|
redis() {
|
2021-06-06 14:26:46 +00:00
|
|
|
_commonmod
|
2021-06-01 23:17:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
haproxy() {
|
2021-06-06 14:26:46 +00:00
|
|
|
_commonmod
|
2020-11-20 16:31:49 +00:00
|
|
|
}
|
|
|
|
|
2021-06-01 23:17:41 +00:00
|
|
|
rspamd() {
|
2021-06-06 14:26:46 +00:00
|
|
|
_commonmod
|
2021-06-01 23:17:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
wireguard() {
|
2021-06-06 14:26:46 +00:00
|
|
|
_commonmod
|
|
|
|
}
|
|
|
|
|
|
|
|
_commonmod() {
|
|
|
|
modname="${subpkgname##$pkgname-}"
|
|
|
|
install_if="$pkgname redxen-config-$modname"
|
|
|
|
_modinstall "$modname"
|
|
|
|
}
|
|
|
|
|
|
|
|
_modinstall() {
|
|
|
|
_rx_installdir="$_rx_installdir/module" rx_install "$1".conf
|
2021-06-01 23:17:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sha512sums="
|
|
|
|
5a0f1dab5c4887700f7f29eeb0d1be28690737f1689a12e67861be4c0bb8276ece8fcb279983e6e3bc5484bd6aa932b663d6ff775c68e33c1190fcdbaa3b1889 main.conf
|
2021-06-06 14:26:46 +00:00
|
|
|
3f01fceee3333cb4f1723333d2e8f7c77e2cf2d2d5a6d7679ebcdb4edda23db22ebe1bd4eeec1a92a0245ef81b6a0849a4b9341fa66092ea82149100d189e037 secret
|
2021-06-01 23:17:41 +00:00
|
|
|
532d6b79eafb7629ef3f2a16f2f9323369d93357b301e44c111661eab8108a3d09dae1fd2c7f8a4c3d832c66285e2098fcd7713f37b545b5616d7c9a749a2684 base.conf
|
|
|
|
5a81b295f17189115fe93d1d68d94181aaab32dfcdd3e4d0480991c515d0cec57cb58bac354b893a5109a9e62d400a278489c9d64b997968ad8f326e02c7ddb1 unbound.conf
|
|
|
|
a4bc80850c94291d00b2ad56e50216ab36515bcc176b3c5678b24c3d5a3740b9de9006df8e37e42942a50227e6b27321d267e27decffbf6d9a37755d3224121e redis.conf
|
|
|
|
f219fcd9c1aeb4503e813f00c51cc2a2ccb8c297727f3542e614c784b977ef6a32d492de750b8d4338f95172dfdc0e388a72662e80c92a890e2bfc7d34e3396d haproxy.conf
|
|
|
|
0e5e8282a77553cf75b3184367486d37f4dd6e6ed5a216f2ca5b94f4fe7b151565eb5d9fc35f5eadc154da41aa39f0f7979ded054be9da94b981326ca13c6b8f rspamd.conf
|
|
|
|
3f6d05082d4e01fb7498c82fb92fb479c5766148c9dcfd118d248ceaf6838f4794b940a8fcff0ec6020000806c6418f93e5aa60cbf32fd826fa4f9870f925ba7 wireguard.conf
|
2021-06-06 14:26:46 +00:00
|
|
|
cd891003216a1f0b1d7718b0cda39f798984a5a0ffae11b87edc933f2a96c15255cddaa19e8bb5514c7e1c2478c46d5042043a4af6e21805188863e29606daab postgresql.conf
|
2021-06-01 23:17:41 +00:00
|
|
|
"
|