aboutsummaryrefslogtreecommitdiffstats
path: root/renew.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'renew.sh.in')
-rw-r--r--renew.sh.in15
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
)