First s6 service
This commit is contained in:
parent
c08f96b5a9
commit
8778546a6b
40
s6/APKBUILD-s6.template
Normal file
40
s6/APKBUILD-s6.template
Normal file
@ -0,0 +1,40 @@
|
||||
. ../../APKBUILD.template
|
||||
|
||||
: ${pkgname:?"No package prefix provided"}
|
||||
: ${_rx_s6_svcname:="redxen.$_rx_pkgname"}
|
||||
|
||||
pkgname="$pkgname-s6-$_rx_pkgname"
|
||||
pkgdesc="RedXen s6 configuration: $_rx_pkgname"
|
||||
depends="nnd-s6-services $_rx_pkgname redxen-config-$_rx_pkgname"
|
||||
|
||||
rx_s6_svc_install() {
|
||||
mkdir -p "$(rx_cpkgdir)"/etc/s6/dist/rc
|
||||
mv "$builddir"/rc "$(rx_cpkgdir)"/etc/s6/dist/rc/"${1:-$_rx_s6_svcname}"
|
||||
}
|
||||
|
||||
rx_s6_env_install() {
|
||||
mkdir -p "$(rx_cpkgdir)"/etc/s6/dist/env
|
||||
mv "$builddir"/env "$(rx_cpkgdir)"/etc/s6/dist/env/"${1:-$_rx_s6_svcname}"
|
||||
}
|
||||
|
||||
rx_s6_bundle_add() {
|
||||
mkdir -p "$(rx_cpkgdir)"/etc/s6/dist/rc/bundle.redxen/contents.d/
|
||||
touch "$(rx_cpkgdir)"/etc/s6/dist/rc/bundle.redxen/contents.d/"${1:-$_rx_s6_svcname}"
|
||||
}
|
||||
|
||||
# Override defaults
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp -R "$startdir"/rc "$builddir"
|
||||
if [ -d "$startdir"/env ]; then
|
||||
cp -R "$startdir"/env "$builddir"
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
rx_s6_svc_install
|
||||
rx_s6_bundle_add
|
||||
if [ -d "$builddir"/env ]; then
|
||||
rx_s6_env_install
|
||||
fi
|
||||
}
|
7
s6/unbound/APKBUILD
Normal file
7
s6/unbound/APKBUILD
Normal file
@ -0,0 +1,7 @@
|
||||
# Contributor: Alex Denes <caskd@redxen.eu>
|
||||
# Maintainer: Alex Denes <caskd@redxen.eu>
|
||||
|
||||
. ../APKBUILD-s6.template
|
||||
|
||||
pkgver=2022.11.01.01
|
||||
pkgrel=0
|
1
s6/unbound/env/CFGFILE
vendored
Normal file
1
s6/unbound/env/CFGFILE
vendored
Normal file
@ -0,0 +1 @@
|
||||
/etc/redxen/unbound/base.conf
|
12
s6/unbound/rc/run
Executable file
12
s6/unbound/rc/run
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/execlineb -P
|
||||
s6-envdir -i /etc/s6/env/path
|
||||
importas -i PATH PATH
|
||||
|
||||
s6-envdir -I /etc/s6/env/redxen.unbound
|
||||
importas -i CFGFILE CFGFILE
|
||||
|
||||
emptyenv
|
||||
|
||||
export PATH $PATH
|
||||
|
||||
exec unbound -c $CFGFILE
|
1
s6/unbound/rc/type
Normal file
1
s6/unbound/rc/type
Normal file
@ -0,0 +1 @@
|
||||
longrun
|
Loading…
Reference in New Issue
Block a user