From 167ab195cbde8b09318b04a84901b1e83a14d18b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 12 Feb 2022 21:53:09 -0600 Subject: [PATCH] Update defaults.inc --- defaults.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/defaults.inc b/defaults.inc index 8645ed9..55c7c8c 100755 --- a/defaults.inc +++ b/defaults.inc @@ -13,6 +13,10 @@ NM_SERVICES['qbittorrent']='qBittorrent (Torrent Downloader)' NM_SERVICES['snap.tautulli.tautulli']='Tautulli (Plex Stats)' NM_SERVICES['ombi']='Ombi (Download Requester)' - -VPN_START='/bin/systemctl start openvpn' -VPN_STOP='/bin/systemctl stop openvpn' \ No newline at end of file +if [[ $(/sbin/ip -o -4 addr list ens160 | awk '{print $4}' | cut -d/ -f1) == *"10.10.1.24"* ]]; then + VPN_START='/usr/bin/nordvpn connect' + VPN_STOP='/usr/bin/nordvpn disconnect' +else + VPN_START='/bin/systemctl start openvpn' + VPN_STOP='/bin/systemctl stop openvpn' +fi \ No newline at end of file