diff --git a/src/wg-quick/freebsd.bash b/src/wg-quick/freebsd.bash index 88aa2b4..6211b7a 100755 --- a/src/wg-quick/freebsd.bash +++ b/src/wg-quick/freebsd.bash @@ -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