#!/bin/sh _timeout=5 _url="https://www.rygel.us/etc/keys/personal" cache="/etc/ssh/keys" _temp="$(mktemp)" if curl \ --connect-timeout $_timeout \ "$_url" > "$_temp" 2>/dev/null then cat "$_temp" | tee $cache else cat $cache fi rm "$_temp"