Update mm-scripts.sh

This commit is contained in:
2023-03-22 21:29:27 -05:00
parent cf9c4f4a6c
commit 603af7237c

View File

@@ -149,7 +149,8 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
defaultgw=$(/sbin/ip route show | grep default | cut -d' ' -f 3)
# if [ "${zerogw}" != "${defaultgw}" ]; then
if [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then
# if [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then
if [ "${zerogw}" != "${defaultgw}" ] || [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then
echo "$(date) - Adding VPN default routes" >> $logfile
echo -en "${idsCL[LightCyan]}Adding VPN default routes :${idsCL[Default]}"
/bin/ip route del default