Skip to content

Wrapper for step ca renew that behaves sanely with systemd #1549

@Torstein-Eide

Description

@Torstein-Eide

Hi folks,

I ran into a small but persistent operational annoyance with step ca renew:

When a certificate does not need renewal, step exits with code 1.
That is technically correct – but in a systemd world, it looks like a failure.

So I wrote a tiny wrapper that makes renewal boring again:

  • Pre-checks whether renewal is actually needed
  • Only runs step ca renew when required
  • Normalizes exit codes so “nothing to do” = success
  • Supports post-renew hooks (reload nginx, haproxy, etc.)
  • Plays nicely with systemd timers and services

Repo:
https://github.com/Torstein-Eide/Step-certificate-renewal-wrapper-script

The goal is not to replace step, but to make it operationally smoother in real systems where exit codes matter and automation should stay quiet unless something actually broke.

Bluntly:
step is correct.
systemd is strict.
This script keeps the peace between them.

Feedback welcome. If this solves a problem for others, even better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions