summaryrefslogtreecommitdiffstatshomepage
path: root/src/wg-quick/freebsd.bash
diff options
context:
space:
mode:
Diffstat (limited to 'src/wg-quick/freebsd.bash')
-rwxr-xr-xsrc/wg-quick/freebsd.bash2
1 files changed, 1 insertions, 1 deletions
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