1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-02-12 11:21:56 +00:00
openmptcprouter-vps/glorytun-udp-run
2018-06-01 13:11:58 +00:00

19 lines
307 B
Bash

#!/bin/sh
set -e
if [ ! -f "$1" ]; then
echo "usage: $(basename "$0") FILE"
exit 1
fi
. "$(readlink -f "$1")"
DEV="gt${HOST:+c}-udp-$(basename "$1")"
exec glorytun \
bind $BIND $BIND_PORT \
keyfile "$1".key \
${DEV:+dev "$DEV"} \
${HOST:+to "$HOST" "$PORT"} \
${OPTIONS:+$OPTIONS}