From 517ca983569e87eb0e17ef0f7b714573fc9520da Mon Sep 17 00:00:00 2001
From: sinanmohd <sinan@firemail.cc>
Date: Mon, 20 Mar 2023 18:39:27 +0530
Subject: vpn: only call wip when the connection is successful

---
 vpn | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/vpn b/vpn
index b22667f..0eef247 100755
--- a/vpn
+++ b/vpn
@@ -19,9 +19,7 @@ main()
 	else
 		sudo -A -p " init, authentication required: " wg-quick up "$wg_conf" &&
 			note "traffic routed through $wg_conf"
-	fi
-
-	command -v wip > /dev/null &&
+	fi && command -v wip > /dev/null &&
 		wip
 }
 
-- 
cgit v1.2.3