wg-quick: darwin: ensure socket directory exists
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
19990e2937
commit
cfa4203be7
1 changed files with 1 additions and 5 deletions
|
@ -100,12 +100,8 @@ get_real_interface() {
|
||||||
|
|
||||||
add_if() {
|
add_if() {
|
||||||
export WG_DARWIN_UTUN_NAME_FILE="/var/run/wireguard/$INTERFACE.name"
|
export WG_DARWIN_UTUN_NAME_FILE="/var/run/wireguard/$INTERFACE.name"
|
||||||
|
mkdir -m 0700 -p "/var/run/wireguard/"
|
||||||
cmd wireguard-go utun
|
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
|
get_real_interface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue