feat: add finallycoffee.base.lego role

This commit is contained in:
2024-05-19 20:40:43 +02:00
parent eab7b7e915
commit 960d95a924
7 changed files with 269 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
LEGO_BINARY=$(/usr/bin/env which lego)
FILES_IN_DIR=$(find "$LEGO_CERT_STORE_PATH/certificates" | wc -l)
if [[ $FILES_IN_DIR -gt 2 ]]; then
$LEGO_BINARY $LEGO_COMMAND_ARGS renew --days=$LEGO_CERT_DAYS_TO_RENEW
else
$LEGO_BINARY $LEGO_COMMAND_ARGS run
fi