This commit is contained in:
2023-03-04 23:03:47 -06:00
parent bc21928e65
commit 05e41b82a3
2 changed files with 66 additions and 94 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.02252023'
VERS='2.03042023'
MMFOLDER="/opt/idssys/mediamanager"
MMSRV=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
@@ -8,7 +8,6 @@ MMSRV=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
noheader=' check noup stop '
declare -A NM_SERVICES
NM_SERVICES['nordvpn']='NordVPN (VPN Tunnel)'
NM_SERVICES['openvpn']='OpenVPN (TorGuard VPN Tunnel)'
NM_SERVICES['wireguard']='WireGuard (TorGuard VPN Tunnel)'
NM_SERVICES['lidarr']='Lidarr (Music Manager)'
@@ -21,19 +20,14 @@ NM_SERVICES['qbittorrent']='qBittorrent (Torrent Downloader)'
NM_SERVICES['snap.tautulli.tautulli']='Tautulli (Plex Stats)'
NM_SERVICES['ombi']='Ombi (Download Requester)'
#if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"10.10.1.24"* ]]; then
if [ "${VPN_INTERFACE}" = "nordlynx" ]; then
if [ "${VPN_INTERFACE}" = "tun0" ]; then #openvpn
VPN_START=(/bin/systemctl start openvpn)
VPN_STOP=(/bin/systemctl stop openvpn)
else #default wireguard
VPN_START=(/usr/bin/wg-quick up ${VPN_INTERFACE})
VPN_STOP=(/usr/bin/wg-quick down ${VPN_INTERFACE})
# VPN_START=(/usr/bin/nordvpn connect United_States Chicago)
# VPN_START=(/usr/bin/nordvpn connect us9316)
VPN_START=(/usr/bin/nordvpn c double_vpn)
VPN_STOP=(/usr/bin/nordvpn disconnect)
else
#VPN_START=(/bin/systemctl start openvpn)
#VPN_STOP=(/bin/systemctl stop openvpn)
VPN_START=(/usr/bin/wg-quick up wg-torguard)
VPN_STOP=(/usr/bin/wg-quick down wg-torguard)
fi
DEBUGLOGSTOP(){