diff --git a/mm-scripts.sh b/mm-scripts.sh index 814a371..e9263ea 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -57,7 +57,7 @@ MMSTART(){ echo OUT=$(/sbin/ip link | grep "${VPN_INTERFACE}") if [ ${#OUT} = 0 ]; then - echo -en "${idsCL[LightCyan]}Setting up the VPN Tunnel config :${idsCL[Default]}" + echo -en "${idsCL[LightCyan]}Setting up the VPN Tunnel config :${idsCL[Default]}" privkey=$(/usr/bin/wg genkey) reqpublickey=$(echo "${privkey}" | /usr/bin/wg pubkey) reqpublickey="$(php -r 'echo rawurlencode($argv[1]);' -- "$reqpublickey")" @@ -97,14 +97,14 @@ vpn_server_port=$(echo ${JSON} | jq -r '.vpn_server_port') " > ${MMFOLDER}/vpninfo - echo -en "${idsCL[LightCyan]}Starting the VPN Tunnel :${idsCL[Default]}" + echo -en "${idsCL[LightCyan]}Starting the VPN Tunnel :${idsCL[Default]}" "${VPN_START[@]}" >/dev/null 2>&1 sleep 5s else - echo -en "${idsCL[Green]}The VPN Tunnel is already running :${idsCL[Default]}" + echo -en "${idsCL[Green]}The VPN Tunnel is already running :${idsCL[Default]}" fi else - echo -en "${idsCL[LightCyan]}Verifying the VPN Tunnel :${idsCL[Default]}" + echo -en "${idsCL[LightCyan]}Verifying the VPN Tunnel :${idsCL[Default]}" mmsv='Verifying' fi @@ -400,7 +400,7 @@ MMSTATUS(){ statusArray+=(${SERVICES_CHECK[@]}) echo for srvc in "${statusArray[@]}"; do - c=0; cw=37 spc='' + c=0; cw=38 spc='' spc1=$((${cw}-${#NM_SERVICES[${srvc}]})) until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done echo -en " ${NM_SERVICES[${srvc}]}$spc: " @@ -434,11 +434,11 @@ MMSTATUS(){ echo MMSTART - echo -e " ${NM_SERVICES[wireguard]} : ${idsCL[Green]}Running${idsCL[Default]}" + echo -e " ${NM_SERVICES[wireguard]} : ${idsCL[Green]}Running${idsCL[Default]}" zerogw=$(/sbin/ip route show | grep 0.0.0.0 | cut -d' ' -f 3) defaultgw=$(/sbin/ip route show | grep default | cut -d' ' -f 3) - echo -e " |- 0.0.0.0 gateway : ${idsCL[Green]}$zerogw${idsCL[Default]}" - echo -en " |- DEFAULT gateway : " + echo -e " |- 0.0.0.0 gateway : ${idsCL[Green]}$zerogw${idsCL[Default]}" + echo -en " |- DEFAULT gateway : " if [ "${zerogw}" == "${defaultgw}" ] && [ "${zerogw}" == "${VPN_INTERFACE}" ]; then echo -e "${idsCL[Green]}$defaultgw${idsCL[Default]}" else @@ -453,7 +453,7 @@ MMSTATUS(){ fi fi - echo -en " |- Verify routing through VPN : " + echo -en " |- Verify routing through VPN : " 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 +time=2 myip.opendns.com @208.67.222.222)