houxiao
2017-04-05 1b6dfd02b81c38108eacfa56aa2d21184cec01e7
ProxyConsole/auto-net-ip.sh
@@ -3,10 +3,10 @@
#crontab:
#*/2 * * * * /bin/sh /opt/auto-net-ip.sh > /dev/null 2>&1
HAS_NET=`ifconfig | grep enp1s0 | grep 172.16`
HAS_NET=`ifconfig | grep enp1s0 | grep 172.24`
if [ -z "$HAS_NET" ]; then
   echo "set ip address"
   ifconfig enp1s0 172.16.23.10/16
   ifconfig enp1s0 172.16.24.10/16
   ifconfig enp2s0 192.168.1.100/24
fi