#!/usr/bin/env bash # Fail early and loudly. set -euo pipefail here=$(dirname $0) store=$HOME/.public-ip if [[ "$(cat $store || true)" != "$($here/get_ip.sh | tee $store)" ]] then exec "$@" fi