feat(roles/lego): Add support for LEGO_HTTP_PORT_FALLBACK #5
No reviewers
Labels
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: finallycoffee/base#5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "jadyn/finallycoffee.base:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ref #4
Commit message scope should not include
roles/
, should befeat(lego): [...]
.Needs some mention/example in lego's README.md
@ -3,8 +3,16 @@
LEGO_BINARY=$(/usr/bin/env which lego)
FILES_IN_DIR=$(find "$LEGO_CERT_STORE_PATH/certificates" | wc -l)
Move L5 directly to before its corresponding if-statement
@ -7,3 +6,1 @@
$LEGO_BINARY $LEGO_COMMAND_ARGS renew --days=$LEGO_CERT_DAYS_TO_RENEW
else
$LEGO_BINARY $LEGO_COMMAND_ARGS run
if [[ -n "$LEGO_HTTP_FALLBACK_PORT" ]]; then
Where is $LEGO_HTTP_FALLBACK_PORT coming from? possibly missing documentation...
@ -8,2 +6,2 @@
else
$LEGO_BINARY $LEGO_COMMAND_ARGS run
if [[ -n "$LEGO_HTTP_FALLBACK_PORT" ]]; then
nc -z 127.0.0.1 $LEGO_HTTP_PORT;
specify
-w
to avoid waiting for up to 30s. Also consider lego binds to0.0.0.0
, and a webserver might be bound only to an external IP (which would be not detected properly)As the debian/stable version doesn't support IPv6 (yet?) and other options utilizing pre-installed tools require root access, this could be fixed by using a more complex approach or installing additional software. Otherwise I'd suggest looping over all configured (external IPs) using
$(hostname --all-ip-addresses)
.@ -10,1 +10,4 @@
fi
fi
LEGO_COMMAND_ARGS_EXPANDED=$(bash -c "echo $LEGO_COMMAND_ARGS") # This is a bit icky but
echo $LEGO_COMMAND_ARGS_EXPANDED
Remove debug statement
d08993d358
to96f5da9bf6