From cfa4203be73ab554739199668f61da50ff2becaf Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 15 May 2018 20:05:48 +0200 Subject: [PATCH] wg-quick: darwin: ensure socket directory exists Signed-off-by: Jason A. Donenfeld --- src/wg-quick/darwin.bash | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/wg-quick/darwin.bash b/src/wg-quick/darwin.bash index c4fc8f1..0c28085 100755 --- a/src/wg-quick/darwin.bash +++ b/src/wg-quick/darwin.bash @@ -100,12 +100,8 @@ get_real_interface() { add_if() { export WG_DARWIN_UTUN_NAME_FILE="/var/run/wireguard/$INTERFACE.name" + mkdir -m 0700 -p "/var/run/wireguard/" cmd wireguard-go utun - local i - for i in {1..30}; do - [[ -f "/var/run/wireguard/$INTERFACE.name" ]] && break - sleep 0.1 - done get_real_interface }