Make sure /etc/wireguard exists

This commit is contained in:
angristan 2019-05-24 00:25:25 +02:00
parent 8cb8b130d1
commit 9c9cf66fc8

View File

@ -88,6 +88,9 @@ elif [[ "$OS" = 'arch' ]]; then
pacman -S wireguard-tools
fi
# Make sure the directory exists (this does not seem the be the case on fedora)
mkdir /etc/wireguard > /dev/null 2>&1
# Generate key pair for the server
SERVER_PRIV_KEY=$(wg genkey)
SERVER_PUB_KEY=$(echo "$SERVER_PRIV_KEY" | wg pubkey)