MEDIUM: acme/ssl: remove 'acme ps' in favor of 'acme status'

Remove the 'acme ps' command which does not seem useful anymore with the
'acme status' command.

The big difference with the 'acme status' command is that it was only
displaying the running tasks instead of the status of all certificate.
This commit is contained in:
William Lallemand 2025-05-06 15:20:05 +02:00
parent 48f1ce77b7
commit b7c4a68ecf
3 changed files with 2 additions and 35 deletions

View File

@ -5943,7 +5943,7 @@ certificates and start an ACME renewal task when the notAfter task is past
curtime + (notAfter - notBefore) / 12, or 7 days if notBefore is not defined.
The scheduler will then sleep and wakeup after 12 hours.
It is possible to start manually a renewal task with "acme renew'.
See also "acme ps" in the management guide.
See also "acme status" in the management guide.
The following keywords are usable in the ACME section:

View File

@ -1641,19 +1641,10 @@ abort ssl crl-file <crlfile>
See also "set ssl crl-file" and "commit ssl crl-file".
acme ps
Show the running ACME tasks. See also "acme renew".
Example:
$ echo "@1 acme ps" | socat /run/haproxy-master.sock - | column -t -s $'\t'
# certificate section state
foobar.pem.rsa LE1 Running
foobar.pem.ecdsa LE2 Running
acme renew <certificate>
Starts an ACME certificate generation task with the given certificate name.
The certificate must be linked to an acme section, see section 3.13. of the
configuration manual. See also "acme ps".
configuration manual. See also "acme status".
acme status
Show the status of every certificates that were configured with ACME.

View File

@ -2322,29 +2322,6 @@ err:
return cli_dynerr(appctx, errmsg);
}
static int cli_acme_ps_io_handler(struct appctx *appctx)
{
struct mt_list back;
struct acme_ctx *ctx;
chunk_reset(&trash);
chunk_appendf(&trash, "# certificate\tsection\tstate\n");
if (applet_putchk(appctx, &trash) == -1)
return 1;
MT_LIST_FOR_EACH_ENTRY_LOCKED(ctx, &acme_tasks, el, back) {
chunk_appendf(&trash, "%s\t%s\tRunning\n", ctx->store->path, ctx->cfg->name);
/* TODO: handle backref list when list of task > buffer size */
if (applet_putchk(appctx, &trash) == -1)
return 1;
}
return 1;
}
static int cli_acme_status_io_handler(struct appctx *appctx)
{
struct ebmb_node *node = NULL;
@ -2416,7 +2393,6 @@ static int cli_acme_ps(char **args, char *payload, struct appctx *appctx, void *
static struct cli_kw_list cli_kws = {{ },{
{ { "acme", "renew", NULL }, "acme renew <certfile> : renew a certificate using the ACME protocol", cli_acme_renew_parse, NULL, NULL, NULL, 0 },
{ { "acme", "ps", NULL }, "acme ps : show running ACME tasks", cli_acme_ps, cli_acme_ps_io_handler, NULL, NULL, 0 },
{ { "acme", "status", NULL }, "acme status : show status of certificates configured with ACME", cli_acme_ps, cli_acme_status_io_handler, NULL, NULL, 0 },
{ { NULL }, NULL, NULL, NULL }
}};