#!/bin/sh # 2021-04-27 if [ $# -lt 2 ]; then echo "$0 host ipv4-address interface [private-key]" echo " host: where to find the OpenWRT device" echo " ipv4-address: which ipv4 address to use" echo " private-key: Use this wireguard key instead of generating one" exit 1 fi my_ip=$1; shift my_wireguard_ip=$1; shift interface=ungleichipv4 vpn_endpoint_host=vpn-18515529.ungleich.ch if [ $# -eq 1 ]; then private_key=$1; shift else private_key=$(wg genkey) fi public_key=$(echo $private_key | wg pubkey) vpn_endpoint_host=vpn-18515529.ungleich.ch vpn_endpoint_pubkey=6BRnQ+dmeFzVCH9RbM1pbJ7u3y3qrl+zUzzYCmC88kE= cat <