Fix trying to edit routing tables even in config-only mode

This commit is contained in:
Michael Moon
2022-06-05 17:07:50 +08:00
parent f96ce853f1
commit 74626ea240

View File

@@ -237,6 +237,8 @@ if [ -z "$WG_HOST$WG_PORT" ]; then
exit 1
fi
if [ -z "$OPT_CONFIGONLY" ]
then
if ! ip route show table "$HARDWARE_ROUTE_TABLE" 2>/dev/null | grep -q .
then
ROUTES_ADD=$(
@@ -259,6 +261,7 @@ then
echo "${BOLD}*** PLEASE NOTE: if this table isn't updated by your network post-connect hooks, your connection cannot remain up if your network links change${NORMAL}"
echo "Managing such hooks is beyond the scope of this script"
fi
fi
if ! [ -r "$REMOTEINFO" ]
then