aports/openrc/APKBUILD-openrc.template
Alex Denes 8df9fdc4ab
Reorganization, automation and more
- More templating and inheritance
- New commands
+ rx_replace
+ rx_install
+ rx_cpkgdir
- More transparency with secrets being sourced as variables and replaced
- Modularization of configs
+ telegraf
+ nginx (partial)
+ fastd
+ wireguard
+ unbound
- Split of unbound configurations and bind zones
- Bumping of key versions (rolling keys)
+ ZSK/KSK
+ OpenDKIM
- Relaxed permission defaults
and other smaller tweaks...
2021-06-01 23:17:41 +00:00

35 lines
1.0 KiB
Plaintext

. ../../APKBUILD.template
: ${pkgname:?"No package prefix provided"}
: ${_rx_openrc_svcname:="redxen.$_rx_pkgname"}
pkgname="$pkgname-openrc-$_rx_pkgname"
pkgdesc="RedXen openrc configuration: $_rx_pkgname"
depends="openrc $_rx_pkgname redxen-config-$_rx_pkgname"
source="runfile conffile"
rx_openrc_runfile_link() {
mkdir -p "$(rx_cpkgdir)"/etc/init.d
ln -s "${1:-$_rx_pkgname}" "$(rx_cpkgdir)"/etc/init.d/"${2:-$_rx_openrc_svcname}"
}
rx_openrc_runfile_install() {
_rx_fperm="755" _rx_installdir="/etc/init.d" rx_install "${1:-runfile}" "${2:-$_rx_openrc_svcname}"
}
rx_openrc_conffile_install() {
_rx_fperm="644" _rx_installdir="/etc/conf.d" rx_install "${1:-conffile}" "${2:-$_rx_openrc_svcname}"
}
rx_openrc_runlevel_add() {
mkdir -p "$(rx_cpkgdir)"/etc/runlevels/"${2:-$_rx_openrc_grpname}"
ln -s /etc/init.d/"${1:-$_rx_openrc_svcname}" "$(rx_cpkgdir)"/etc/runlevels/"${2:-$_rx_openrc_grpname}"
}
# Override default to install runfile and conffile
package() {
rx_openrc_runlevel_add
rx_openrc_runfile_install
rx_openrc_conffile_install
}