Ubuntu Pastebin

Paste from Justice at Thu, 28 Sep 2017 17:26:19 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
metric=$1
gateway=$2
cidr=$3

for i in $(cat ips | grep "^[0-9]"); do
        addip="
        iface ens192 inet static \n
                address ${i}/${cidr} \n
                post-up route add default gw ${gateway} metric ${metric} \n
        "
        echo -e $addip >> /etc/network/interfaces
done
Download as text