#!/bin/bash set -eu set -o pipefail nameserver=$(set -eu; set -o pipefail; sed 's/#.*$//' < /etc/resolv.conf | grep nameserver | awk ' { print $2 }' | head -1) notify-when-up2 --no-email -i 1 -P -f "dig @$nameserver www.google.com"