mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-10-13 08:25:06 +03:00
18 lines
407 B
Bash
Executable file
18 lines
407 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
set -e
|
|
|
|
CONF_DIR="/etc/yggdrasil-network"
|
|
|
|
if [ ! -f "$CONF_DIR/config.conf" ]; then
|
|
echo "generate $CONF_DIR/config.conf"
|
|
(umask 037 && yggdrasil --genconf > "$CONF_DIR/config.conf")
|
|
fi
|
|
|
|
if [ -n "$ALLOW_IPV6_FORWARDING" ]; then
|
|
echo "set sysctl -w net.ipv6.conf.all.forwarding=1"
|
|
sysctl -w net.ipv6.conf.all.forwarding=1
|
|
fi
|
|
|
|
yggdrasil --useconf < "$CONF_DIR/config.conf"
|
|
exit $?
|