vpn2
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
VERS='1.01232022'
|
VERS='1.01232022'
|
||||||
|
|
||||||
|
MMSRV=$(/sbin/ip -o -4 addr list ens160 | awk '{print $4}' | cut -d/ -f1)
|
||||||
|
|
||||||
declare -A NM_SERVICES
|
declare -A NM_SERVICES
|
||||||
NM_SERVICES['nordvpn']='NordVPN (NordVPN VPN Tunnel)'
|
NM_SERVICES['nordvpn']='NordVPN (NordVPN VPN Tunnel)'
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ source /opt/idssys/defaults/default.inc
|
|||||||
source /opt/idssys/settings/mediamanager.conf
|
source /opt/idssys/settings/mediamanager.conf
|
||||||
source /opt/idssys/mediamanager/defaults.inc
|
source /opt/idssys/mediamanager/defaults.inc
|
||||||
|
|
||||||
|
|
||||||
if [ "${action}" != "check" ] && [ "${action}" != "update" ]; then
|
if [ "${action}" != "check" ] && [ "${action}" != "update" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${idsCL[LightGreen]} MediaManager ${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
echo -e "${idsCL[LightGreen]} MediaManager ${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
||||||
@@ -119,7 +118,7 @@ MMSTOP(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
MMSTATUS(){
|
MMSTATUS(){
|
||||||
if [[ $(/sbin/ip -o -4 addr list ens160 | awk '{print $4}' | cut -d/ -f1) == *"10.10.1.24"* ]]; then
|
if [[ ${MMSRV} == *"10.10.1.24"* ]]; then
|
||||||
statusArray=("nordvpn")
|
statusArray=("nordvpn")
|
||||||
else
|
else
|
||||||
statusArray=("openvpn")
|
statusArray=("openvpn")
|
||||||
@@ -132,9 +131,11 @@ MMSTATUS(){
|
|||||||
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
|
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
|
||||||
|
|
||||||
if [ "$(systemctl is-active ${srvc})" != "active" ]; then
|
if [ "$(systemctl is-active ${srvc})" != "active" ]; then
|
||||||
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
if [ "$(systemctl is-active ${srvc})" != "active" ]; then
|
||||||
else
|
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
else
|
||||||
|
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user