From 5b406403496e4a57ad82a1509545d030b098ddbc Mon Sep 17 00:00:00 2001 From: dyma solovei <53943884+bevzzz@users.noreply.github.com> Date: Wed, 20 Dec 2023 09:03:45 +0100 Subject: [PATCH] fix(sg): start Caddy admin server before `caddy trust` (#58928) fix(sg): start Caddy admin before `caddy trust` From docs: This command will attempt to connect to Caddy's admin API to fetch the root certificate, using the GET /pki/ca//certificates endpoint. If the admin server is not running at the moment, the GET request will not succeed, and the certificate won't be installed correctly. --- dev/caddy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev/caddy.sh b/dev/caddy.sh index 7274bd376d2..d12aad19f79 100755 --- a/dev/caddy.sh +++ b/dev/caddy.sh @@ -29,4 +29,6 @@ chmod +x "${target}" popd >/dev/null -exec "${target}" "$@" +trap '${target} stop' EXIT SIGINT +eval "${target} start" +"${target}" "$@"