Commit | Line | Data |
---|---|---|
55799f78 MW |
1 | #! /bin/sh |
2 | set -e | |
93005620 | 3 | usage=" TAG" |
c67523fe MW |
4 | prog=$(readlink -e "$0") |
5 | . "${prog%/*}/../config.sh" | |
55799f78 MW |
6 | . "$home/lib/lib.sh" |
7 | ||
8 | run_as_user "$@" | |
9 | ||
10 | ## Pick out the certificate tag. | |
11 | case $# in 0) fail_usage ;; esac | |
12 | tag=$1; shift | |
13 | case $# in 0) ;; *) fail_usage ;; esac | |
14 | ||
15 | prepare_tmp $tag | |
16 | ||
4bf2ac4f MW |
17 | ## Make sure there's no proxy. I get `urn:acme:error:badNonce' with high |
18 | ## probability if I use IPv6, so avoid rolling the dice. | |
19 | unset http_proxy | |
20 | ||
8a0c5e38 | 21 | ## Let's go. |
08eee2f6 MW |
22 | cert=$home/cert/$tag |
23 | cd $cert | |
8a0c5e38 | 24 | dehydrated -f $HOME/dehydrated-config.sh -fc -s req >full-chain.new |
66e6e0a3 MW |
25 | fix-cert-chain full-chain.new >full-chain.fixed |
26 | mv full-chain.fixed full-chain | |
27 | rm full-chain.new |