diff --git a/scripts/add_cn_ip_route_linux.sh b/scripts/add_cn_ip_route_linux.sh new file mode 100755 index 0000000..86f15ae --- /dev/null +++ b/scripts/add_cn_ip_route_linux.sh @@ -0,0 +1,5254 @@ +#!/bin/sh + +OP="add" +GATEWAY=$(ip route show 0/0 | head -n1 | grep 'via' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+') +DEVICE=$(ip route show 0/0 | head -n1 | grep 'via' | grep -o '\(ens\|enp\|enx\|eth\|en0\|wlan\|wlp\)[A-Za-z0-9]\+') + +echo $OP $GATEWAY $DEVICE + +ip -batch - <