wireguard-tools: add an sv service.

This commit is contained in:
Enno Boland 2020-06-09 18:12:40 +02:00
parent ce9248f1ce
commit 2a11885991
No known key found for this signature in database
GPG Key ID: 5A7B9F1D0DFEB55D
3 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
for conf in /etc/wireguard/*.conf; do
[ -e "$conf" ] || continue;
wg-quick down "$conf"
done

View File

@ -0,0 +1,9 @@
#!/bin/sh
set -e
for conf in /etc/wireguard/*.conf; do
[ -e "$conf" ] || continue;
wg-quick up "$conf"
done
exec chpst -b wireguard pause

View File

@ -1,7 +1,7 @@
# Template file for 'wireguard-tools'
pkgname=wireguard-tools
version=1.0.20200513
revision=1
revision=2
build_wrksrc="src"
build_style=gnu-makefile
make_install_args="WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes"
@ -17,3 +17,7 @@ make_dirs="/etc/wireguard 0700 root root"
post_extract() {
sed -i 's/^CFLAGS /override &/' ${build_wrksrc}/Makefile
}
post_install() {
vsv wireguard
}