2021-01-27 00:05:48 +00:00
|
|
|
pkgname=redxen-openrc-$_svcname
|
|
|
|
url="https://git.redxen.eu/RedXen/aports"
|
|
|
|
arch="noarch"
|
|
|
|
license="none"
|
|
|
|
depends="openrc redxen-config-$_svcname"
|
|
|
|
pkgdesc="RedXen service config for $_svcname"
|
|
|
|
source="runfile conffile"
|
|
|
|
options="!check"
|
|
|
|
builddir="$srcdir"
|
|
|
|
|
2021-02-08 16:04:16 +00:00
|
|
|
openrc_rx_add_to_runlevel() {
|
|
|
|
mkdir -p "${1:-$pkgdir}"/etc/runlevels/"${3:-$_grpname}"
|
|
|
|
ln -s /etc/init.d/"${2:-${_svcname}.redxen}" "${1:-$pkgdir}"/etc/runlevels/${3:-$_grpname}
|
2021-01-27 00:05:48 +00:00
|
|
|
}
|
|
|
|
|
2021-02-08 16:04:16 +00:00
|
|
|
openrc_rx_install_runfile() {
|
|
|
|
install -Dm755 "${2:-runfile}" "${1:-$pkgdir}"/etc/init.d/"${3:-${_svcname}.redxen}"
|
2021-01-27 00:05:48 +00:00
|
|
|
}
|
|
|
|
|
2021-02-08 16:04:16 +00:00
|
|
|
openrc_rx_install_conffile() {
|
|
|
|
install -Dm644 "${2:-conffile}" "${1:-$pkgdir}"/etc/conf.d/"${3:-${_svcname}.redxen}"
|
2021-01-27 00:05:48 +00:00
|
|
|
}
|
|
|
|
|
2021-02-08 16:04:16 +00:00
|
|
|
openrc_rx_link_original() {
|
|
|
|
mkdir -p "${1:-$pkgdir}"/etc/init.d
|
|
|
|
ln -s "${2:-$_svcname}" "${1:-$pkgdir}"/etc/init.d/"${3:-${_svcname}.redxen}"
|
|
|
|
}
|
|
|
|
|
|
|
|
openrc_rx_link_instance() {
|
|
|
|
mkdir -p "${1:-$pkgdir}"/etc/init.d
|
|
|
|
ln -s "${2:-$_svcname}".redxen "${1:-$pkgdir}"/etc/init.d/"$3"
|
2021-01-27 00:05:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2021-02-08 16:04:16 +00:00
|
|
|
openrc_rx_add_to_runlevel
|
|
|
|
openrc_rx_install_runfile
|
|
|
|
openrc_rx_install_conffile
|
2021-01-27 00:05:48 +00:00
|
|
|
}
|
|
|
|
|