From 9c9cf66fc8921fd814b24808e1e0ac61e5773a7c Mon Sep 17 00:00:00 2001 From: angristan Date: Fri, 24 May 2019 00:25:25 +0200 Subject: [PATCH] Make sure /etc/wireguard exists --- wireguard-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wireguard-install.sh b/wireguard-install.sh index c2bae10..530e19b 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -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)