acme.sh: move to procd to ensure logging gets to syslog

acme.sh error output never made it to the syslog, so:
* Add procd setup to catch stderr
* Make sure a message goes to syslog if acme.sh dies due to SIGINT

Signed-off-by: Aditya Bhargava <rightaditya@gmail.com>
This commit is contained in:
Aditya Bhargava
2025-09-22 03:56:17 -04:00
committed by Toke Høiland-Jørgensen
parent e4bdefe1c2
commit 76b676e4eb
3 changed files with 61 additions and 54 deletions

View File

@@ -67,7 +67,7 @@ get)
else
set -- "$@" --renew --home "$state_dir" -d "$main_domain"
log info "$ACME $*"
trap '$NOTIFY renew-failed;exit 1' INT
trap 'log err "Renew failed: SIGINT";$NOTIFY renew-failed;exit 1' INT
$ACME "$@"
status=$?
trap - INT
@@ -141,7 +141,7 @@ get)
set -- "$@" --issue --home "$state_dir"
log info "$ACME $*"
trap '$NOTIFY issue-failed;exit 1' INT
trap 'log err "Issue failed: SIGINT";$NOTIFY issue-failed;exit 1' INT
"$ACME" "$@" \
--pre-hook "$NOTIFY prepare" \
--renew-hook "$NOTIFY renewed"