#!/bin/sh
modprobe tun
# limiting caps is temporarily disabled, as it breaks with
# setpriv: libcap-ng is too old for "all" caps
# TODO: instead of dropping all caps, start with a
# non-priv user and manually add needed privileges instead.
#caps='-all,+NET_ADMIN,+NET_RAW'
#drop_caps="setpriv --inh-caps $caps --bounding-set $caps"
if [ -f /etc/yggdrasil.conf ]; then
	exec yggdrasil -useconffile /etc/yggdrasil.conf 2>&1
else
	exec yggdrasil -autoconf 2>&1
fi
