Update mm-scripts.sh
This commit is contained in:
@@ -461,7 +461,7 @@ MMSTATUS(){
|
|||||||
c=0; spc=''
|
c=0; spc=''
|
||||||
spc1=$((${cw_spc}-${#MM_SERVICES[${srvc}]}))
|
spc1=$((${cw_spc}-${#MM_SERVICES[${srvc}]}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en " ${idsCL[LightCyan]}${MM_SERVICES[${srvc}]}$spc: ${idsCL[Default]}"
|
echo -en " ${idsCL[White]}${MM_SERVICES[${srvc}]}$spc: ${idsCL[Default]}"
|
||||||
|
|
||||||
if [ "$(systemctl is-active ${srvc})" != "active" ] && [ "${srvc}" != "wireguard" ]; then
|
if [ "$(systemctl is-active ${srvc})" != "active" ] && [ "${srvc}" != "wireguard" ]; then
|
||||||
if [ -f ${MMFOLDER}/mm.noservices ]; then
|
if [ -f ${MMFOLDER}/mm.noservices ]; then
|
||||||
@@ -485,13 +485,13 @@ MMSTATUS(){
|
|||||||
msg=" |- 0.0.0.0 Gateway"
|
msg=" |- 0.0.0.0 Gateway"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
echo -e "${idsCL[Green]}$zerogw${idsCL[Default]}"
|
echo -e "${idsCL[Green]}$zerogw${idsCL[Default]}"
|
||||||
|
|
||||||
msg=" |- DEFAULT Gateway"
|
msg=" |- DEFAULT Gateway"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
|
|
||||||
if [ "${zerogw}" == "${defaultgw}" ] && [ "${zerogw}" == "${VPN_INTERFACE}" ]; then
|
if [ "${zerogw}" == "${defaultgw}" ] && [ "${zerogw}" == "${VPN_INTERFACE}" ]; then
|
||||||
echo -e "${idsCL[Green]}$defaultgw${idsCL[Default]}"
|
echo -e "${idsCL[Green]}$defaultgw${idsCL[Default]}"
|
||||||
@@ -512,7 +512,7 @@ MMSTATUS(){
|
|||||||
msg=" ${MM_SERVICES[wireguard]}"
|
msg=" ${MM_SERVICES[wireguard]}"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc}: ${idsCL[Default]}"
|
echo -en "${idsCL[White]}${msg}${spc}: ${idsCL[Default]}"
|
||||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||||
|
|
||||||
zerogw=$(/sbin/ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
|
zerogw=$(/sbin/ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
|
||||||
@@ -521,13 +521,13 @@ MMSTATUS(){
|
|||||||
msg=" |- 0.0.0.0 Gateway"
|
msg=" |- 0.0.0.0 Gateway"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
echo -e "${idsCL[Green]}$zerogw${idsCL[Default]}"
|
echo -e "${idsCL[Green]}$zerogw${idsCL[Default]}"
|
||||||
|
|
||||||
msg=" |- DEFAULT Gateway"
|
msg=" |- DEFAULT Gateway"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
|
|
||||||
if [ "${zerogw}" == "${defaultgw}" ] && [ "${zerogw}" == "${VPN_INTERFACE}" ]; then
|
if [ "${zerogw}" == "${defaultgw}" ] && [ "${zerogw}" == "${VPN_INTERFACE}" ]; then
|
||||||
echo -e "${idsCL[Green]}$defaultgw${idsCL[Default]}"
|
echo -e "${idsCL[Green]}$defaultgw${idsCL[Default]}"
|
||||||
@@ -546,7 +546,7 @@ MMSTATUS(){
|
|||||||
msg=" |- Verify routing through VPN"
|
msg=" |- Verify routing through VPN"
|
||||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} : ${idsCL[Default]}"
|
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||||
|
|
||||||
scip=$(/usr/bin/dig +short sc1.scity.us @10.10.10.5 -p 5053)
|
scip=$(/usr/bin/dig +short sc1.scity.us @10.10.10.5 -p 5053)
|
||||||
# mmip=$(/usr/bin/dig +short myip.opendns.com @resolver1.opendns.com)
|
# mmip=$(/usr/bin/dig +short myip.opendns.com @resolver1.opendns.com)
|
||||||
|
|||||||
Reference in New Issue
Block a user