Files
soteria/systemd/cert-renewer.service
John Lancaster 0fee09099a service tweaks
2025-12-29 01:01:05 -06:00

20 lines
624 B
Desktop File

[Unit]
Description=Certificate renewal
After=network-online.target
Documentation=https://smallstep.com/docs/step-ca/certificate-authority-server-production
StartLimitIntervalSec=0
[Service]
Type=oneshot
User=root
; ExecCondition checks if the certificate is ready for renewal.
; ExecCondition=/usr/bin/step certificate needs-renewal ${CERT_LOCATION}
; ExecStart renews the certificate, if ExecCondition was successful.
ExecStart=/usr/bin/step ca renew --force ${CERT_LOCATION} ${KEY_LOCATION}
ExecStartPost=/usr/bin/openssl x509 -noout -subject -issuer -enddate -in ${CERT_LOCATION}
[Install]
WantedBy=multi-user.target