diff --git a/sakamoto/wg0-openrc/APKBUILD b/sakamoto/wg0-openrc/APKBUILD new file mode 100644 index 0000000..2aed7ac --- /dev/null +++ b/sakamoto/wg0-openrc/APKBUILD @@ -0,0 +1,24 @@ +# Contributor: Patrycja Rosa +# Maintainer: Patrycja Rosa +pkgname=wg0-openrc +pkgver=1.0.0 +pkgrel=0 +pkgdesc="Service starting Wireguard interface wg0" +url="https://git.sakamoto.pl/laudompat/alpine-repo" +arch="noarch" +license="MIT" +depends="" +makedepends="" +install="" +subpackages="" +source="wg0" +builddir="$srcdir/tmp" +options="!check" + +package() { + install -Dm755 "$srcdir/wg0" "$pkgdir/etc/init.d/wg0" +} + +sha512sums=" +90a141ebbb0dd54d81d047e5bb264f782df20c011c7fbde4db8ac376a2d59c8a59de9ac258ca1b93741b9e42207cf22c26d2cc1c6f11b6f2e27ad8e2b5be891d wg0 +" diff --git a/sakamoto/wg0-openrc/wg0 b/sakamoto/wg0-openrc/wg0 new file mode 100644 index 0000000..29509f9 --- /dev/null +++ b/sakamoto/wg0-openrc/wg0 @@ -0,0 +1,15 @@ +#!/sbin/openrc-run + +depend() { + need localmount net + use dns + after bootmisc +} + +start() { + wg-quick up wg0 +} + +stop() { + wg-quick down wg0 +}