2017-09-16 01:43:31 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
cd /tmp/ || exit 'cd did not work'
|
2016-07-12 14:33:09 +03:00
|
|
|
curl -o resolv.conf -L "https://api.opennicproject.org/geoip/?resolv&ipv=4"
|
2017-09-16 01:43:31 +03:00
|
|
|
if [ "$1" = 'write' ]; then
|
|
|
|
|
sudo mv resolv.conf /etc/
|
|
|
|
|
else
|
|
|
|
|
less resolv.conf
|
|
|
|
|
fi
|
2016-07-12 14:33:09 +03:00
|
|
|
|