yggdrasil: add changes from upstream systemd unit

Attempt to load tun module in service

Drop unnecessary caps when running service
This commit is contained in:
Will Springer 2020-03-04 17:18:23 -08:00 committed by Toyam Cox
parent b89069d0c4
commit 1f2bdcc821
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,9 @@
#!/bin/sh
modprobe tun
caps='-all,+NET_ADMIN,+NET_RAW'
drop_caps="setpriv --inh-caps $caps --bounding-set $caps"
if [ -f /etc/yggdrasil.conf ]; then
exec /usr/bin/yggdrasil --useconffile /etc/yggdrasil.conf 1>/dev/null
exec $drop_caps yggdrasil --useconffile /etc/yggdrasil.conf 1>/dev/null
else
exec /usr/bin/yggdrasil --autoconf 1>/dev/null
exec $drop_caps yggdrasil --autoconf 1>/dev/null
fi

View File

@ -1,7 +1,7 @@
# Template file for 'yggdrasil'
pkgname=yggdrasil
version=0.3.14
revision=1
revision=2
wrksrc="yggdrasil-go-${version}"
build_style=go
go_import_path=github.com/yggdrasil-network/yggdrasil-go