Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adds all counts to one sum #211

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

dwydler
Copy link
Contributor

@dwydler dwydler commented Dec 6, 2024

If both http-01 and dns-01 challenge are used, the original command returns two values.

jq ".[] | .Certificates | length" /data/acme.json
11
1

Which results in an error occurring in query.

traefik-certs-dumper  | + '[' -e /data/acme.json ]
traefik-certs-dumper  | + jq '.[] | .Certificates | length' /data/acme.json
traefik-certs-dumper  | + '[' 11 1 '!=' 0 ]
traefik-certs-dumper  | sh: 1: unknown operand

Therefore, the command is extended so that only one value is passed.

traefik-certs-dumper  | + '[' -e /data/acme.json ]
traefik-certs-dumper  | + jq '.[] | .Certificates | length' /data/acme.json
traefik-certs-dumper  | + jq -s add
traefik-certs-dumper  | + '[' 12 '!=' 0 ]

@ldez ldez changed the title Adds all counts to one sum docs: adds all counts to one sum Dec 6, 2024
@ldez ldez added documentation enhancement New feature or request labels Dec 6, 2024
Copy link
Owner

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@ldez ldez enabled auto-merge (squash) December 6, 2024 13:11
@ldez ldez merged commit 865dced into ldez:master Dec 6, 2024
4 checks passed
@dwydler dwydler deleted the fix-traefikv2-jq-command branch December 6, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants