mahbinstuff/fixdns.sh
2017-09-16 01:43:31 +03:00

9 lines
209 B
Bash
Executable file

#!/bin/sh
cd /tmp/ || exit 'cd did not work'
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