wesher/tests/entrypoint.sh

21 lines
411 B
Bash
Raw Normal View History

#!/bin/bash
2019-07-12 11:08:41 +02:00
set -e
# Parse arguments
args=("$@")
while [[ $# -gt 0 ]]; do case $1 in
--interface)
iface=$2
shift
;;
esac; shift; done
2019-07-12 11:08:41 +02:00
# Create tun device if necessary
if [ ! -e /dev/net/tun ]; then
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
fi
2019-07-12 11:08:41 +02:00
wireguard-go ${iface:-wgoverlay}
/app/wesher --log-level debug --cluster-key 'ILICZ3yBMCGAWNIq5Pn0bewBVimW3Q2yRVJ/Be+b1Uc=' "${args[@]}"