cdotfis-mac/dotfiles/.local/bin/vpndisconnect

8 lines
154 B
Bash
Executable File

#!/bin/sh
protonvpn-cli d
netDevice="$(ip -4 route ls | awk '/^default/{print $5}')"
nmcli device down "$netDevice"
sleep 1
nmcli device up "$netDevice"