From a3e3f9a524bc3c322f3dc3bb05e1049c239c7b2a Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 25 Apr 2022 07:50:50 +0200 Subject: [PATCH] Correction d'un bug lors de la connexion au VPN --- dotfiles/.zshrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index a5817f6..2ab3886 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -178,8 +178,9 @@ export NVM_DIR="$HOME/.nvm" # exec sway #fi -EXISTS=`ip addr show tun0 > /dev/null && echo $?` -if [ `hostname` = "marty" ] && [ ${EXISTS} = 1 ] ; then +ip addr show tun0 > /dev/null 2>&1 +EXISTS=$? +if [ `hostname` = "marty" ] && [ ${EXISTS} -ne 0 ] ; then echo "Connecting people :|" nmcli connection up VPN-DarKou --ask fi