This commit is contained in:
2022-02-12 22:24:34 -06:00
parent 20546602b9
commit af6fa1cc27
2 changed files with 7 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
VERS='1.01232022'
MMSRV=$(/sbin/ip -o -4 addr list ens160 | awk '{print $4}' | cut -d/ -f1)
declare -A NM_SERVICES
NM_SERVICES['nordvpn']='NordVPN (NordVPN VPN Tunnel)'

View File

@@ -9,7 +9,6 @@ source /opt/idssys/defaults/default.inc
source /opt/idssys/settings/mediamanager.conf
source /opt/idssys/mediamanager/defaults.inc
if [ "${action}" != "check" ] && [ "${action}" != "update" ]; then
echo ""
echo -e "${idsCL[LightGreen]} MediaManager ${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
@@ -119,7 +118,7 @@ MMSTOP(){
}
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")
else
statusArray=("openvpn")
@@ -132,9 +131,11 @@ MMSTATUS(){
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
if [ "$(systemctl is-active ${srvc})" != "active" ]; then
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
else
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
if [ "$(systemctl is-active ${srvc})" != "active" ]; then
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
else
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
fi
fi
done