Add fastd
This commit is contained in:
parent
bbcecab870
commit
0bb5d0a810
|
@ -0,0 +1,29 @@
|
|||
# Contributor: Alex Denes <caskd@redxen.eu>
|
||||
# Maintainer: Alex Denes <caskd@redxen.eu>
|
||||
_svcname=fastd
|
||||
_configpath="/etc/fastd/redxen"
|
||||
_cfgumask=400
|
||||
|
||||
. ../APKBUILD-config.common
|
||||
|
||||
pkgver=2021.02.08
|
||||
pkgrel=0
|
||||
subpackages="$pkgname-crxnrouter" # $pkgname-crxnclient" TODO
|
||||
source="
|
||||
crxn-router.conf
|
||||
"
|
||||
#crxn-client.conf
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"
|
||||
}
|
||||
|
||||
crxnrouter() {
|
||||
install -Dm400 crxn-router.conf "$subpkgdir"/"$_configpath"/crxn-router.conf
|
||||
}
|
||||
|
||||
crxnclient() {
|
||||
install -Dm400 crxn-client.conf "$subpkgdir"/"$_configpath"/crxn-client.conf
|
||||
}
|
||||
|
||||
sha512sums="f0c4dfd3c0cd6c00ece98f3be9c8b70c1654713167da20f12d9867737d9f98b7ee0286ad311e9bf31536d44632ba9dc4b659d9d42c047dba0a14169b32f3849c crxn-router.conf"
|
|
@ -0,0 +1,39 @@
|
|||
# Contributor: Alex Denes <caskd@redxen.eu>
|
||||
# Maintainer: Alex Denes <caskd@redxen.eu>
|
||||
_svcname=fastd
|
||||
_grpname=network
|
||||
|
||||
. ../APKBUILD-openrc.common
|
||||
|
||||
pkgver=2021.02.08
|
||||
pkgrel=4
|
||||
subpackages="$pkgname-crxnrouter" # $pkgname-crxnclient" # TODO
|
||||
depends=""
|
||||
source="
|
||||
runfile
|
||||
"
|
||||
|
||||
build() {
|
||||
echo "FASTD_CONF=\"/etc/fastd/redxen/crxn-router.conf\"" > conffile.crxnrouter
|
||||
echo "FASTD_CONF=\"/etc/fastd/redxen/crxn-client.conf\"" > conffile.crxnclient
|
||||
}
|
||||
|
||||
package() {
|
||||
openrc_rx_install_runfile
|
||||
}
|
||||
|
||||
crxnrouter() {
|
||||
depends="redxen-config-$_svcname-crxnrouter"
|
||||
openrc_rx_add_to_runlevel "$subpkgdir" "fastd.crxnrouter.redxen"
|
||||
openrc_rx_link_instance "$subpkgdir" "$_svcname" "crxnrouter"
|
||||
openrc_rx_install_conffile "$subpkgdir" "$builddir"/"conffile.crxnrouter" "fastd.crxnrouter"
|
||||
}
|
||||
|
||||
crxnclient() {
|
||||
depends="redxen-config-$_svcname-crxnrouter"
|
||||
openrc_rx_add_to_runlevel "$subpkgdir" "fastd.crxnrouter.redxen"
|
||||
openrc_rx_link_instance "$subpkgdir" "$_svcname" "crxnclient"
|
||||
openrc_rx_install_conffile "$subpkgdir" "$builddir"/"conffile.crxnclient" "fastd.crxnclient"
|
||||
}
|
||||
|
||||
sha512sums="68699b730ca24994227c4487f5046e433ba82e475b9f586755e525f9b6c7da7346f6ac04bb17d370bfed7121bb660f11a8e243169e25af391f6d1e87928d9d77 runfile"
|
|
@ -0,0 +1,12 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
: ${FASTD_CONF:=/etc/fastd/fastd.conf}
|
||||
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command=/usr/bin/fastd
|
||||
command_args="--daemon --pid-file $pidfile --config $FASTD_CONF"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall syslog yggdrasil
|
||||
}
|
Loading…
Reference in New Issue