File: //usr/syno/lib/systemd/scripts/policy-route-init.sh
#!/bin/sh
# Copyright (c) 2000-2018 Synology Inc. All rights reserved.
. /etc/iproute2/script/gateway-mgt-function
MULTI_GATEWAY=`/bin/get_key_value /etc/synoinfo.conf multi_gateway`
if [ "x$MULTI_GATEWAY" = "xyes" ]; then
/usr/syno/sbin/synonetdtool --enable-multi-gateway
/usr/syno/sbin/synonetdtool --enable-multi-gateway-v6
else
/usr/syno/sbin/synonetdtool --disable-multi-gateway
/usr/syno/sbin/synonetdtool --disable-multi-gateway-v6
fi
/usr/syno/sbin/synonetdtool --refresh-static-route-rules -4
set_default_gateway_interface
/usr/syno/sbin/synonetdtool --refresh-gateway all