wg-quick: freebsd: check for socket using -S, not -f

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2021-03-21 10:15:32 -06:00
parent 622408872f
commit a43f0b634e

View file

@ -168,7 +168,7 @@ if_exists() {
del_if() {
[[ $HAVE_SET_DNS -eq 0 ]] || unset_dns
if [[ -f /var/run/wireguard/$INTERFACE.sock ]]; then
if [[ -S /var/run/wireguard/$INTERFACE.sock ]]; then
cmd rm -f "/var/run/wireguard/$INTERFACE.sock"
else
cmd ifconfig "$INTERFACE" destroy