#!/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