mahbinstuff/fixdns.sh

10 lines
209 B
Bash
Raw Normal View History

#!/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"
if [ "$1" = 'write' ]; then
sudo mv resolv.conf /etc/
else
less resolv.conf
fi
2016-07-12 14:33:09 +03:00