#! /bin/sh set -e usage=" TAG" prog=$(readlink -e "$0") . "${prog%/*}/../config.sh" . "$home/lib/lib.sh" run_as_user "$@" ## Pick out the certificate tag. case $# in 0) fail_usage ;; esac tag=$1; shift case $# in 0) ;; *) fail_usage ;; esac prepare_tmp $tag ## Make sure there's no proxy. I get `urn:acme:error:badNonce' with high ## probability if I use IPv6, so avoid rolling the dice. unset http_proxy ## Let's go. cert=$home/cert/$tag cd $cert dehydrated -f $HOME/dehydrated-config.sh -fc -s req >full-chain.new mv full-chain.new full-chain