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/<id>/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.
This commit is contained in:
dyma solovei 2023-12-20 09:03:45 +01:00 committed by GitHub
parent 86180de04a
commit 5b40640349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,4 +29,6 @@ chmod +x "${target}"
popd >/dev/null
exec "${target}" "$@"
trap '${target} stop' EXIT SIGINT
eval "${target} start"
"${target}" "$@"