diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-04 19:43:45 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-04 19:43:45 +0100 |
| commit | bb551c7159a4e06982d94973c96ca64057e70884 (patch) | |
| tree | ee52602e6c0c3138235415b8a5a9d059c8cb8852 /renew.sh.in | |
| parent | d3a36b7de4211680db2ea3f2c1ee12440004aed6 (diff) | |
| download | lfacme-bb551c7159a4e06982d94973c96ca64057e70884.tar.gz lfacme-bb551c7159a4e06982d94973c96ca64057e70884.tar.bz2 | |
renew.sh: allow renewing a single certificate
Diffstat (limited to 'renew.sh.in')
| -rw-r--r-- | renew.sh.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/renew.sh.in b/renew.sh.in index 689f992..cecf52a 100644 --- a/renew.sh.in +++ b/renew.sh.in @@ -240,11 +240,17 @@ _docert() { return $? } +_whichcert="$1"; shift +if ! [ -z "$1" ]; then + _fatal "unexpected argument: $1" +fi + cat "$_DOMAINS" \ | egrep -v '^(#|[[:space:]]*$)' \ | ( _default_args="" _exit=0 + _didany=0 while read identifier args; do if [ "$identifier" = "*" ]; then @@ -252,11 +258,20 @@ cat "$_DOMAINS" \ continue fi + if ! [ -z "$_whichcert" ] && [ "$_whichcert" != "$identifier" ]; then + continue + fi + if ! _docert "$identifier" $_default_args $args; then _exit=1 fi + _didany=1 done + if [ "$_didany" -eq 0 ] && ! [ -z "$_whichcert" ]; then + _fatal "certificate not found: %s" "$_whichcert" + fi + exit $_exit ) |
