Skip to content

Commit 22ef324

Browse files
committed
Fix needs-renewal condition and switch to using ExecCondition
1 parent 3e5b90b commit 22ef324

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

systemd/cert-renewer@.service

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Environment=STEPPATH=/etc/step-ca \
1212
CERT_LOCATION=/etc/step/certs/%i.crt \
1313
KEY_LOCATION=/etc/step/certs/%i.key
1414

15-
; ExecStartPre checks if the certificate is ready for renewal,
15+
; ExecCondition checks if the certificate is ready for renewal,
1616
; based on the exit status of the command.
17-
; (In systemd 243 and above, you can use ExecCondition= here.)
18-
ExecStartPre=/usr/bin/step certificate needs-renewal $CERT_LOCATION --roots $STEPPATH/certs/root_ca.crt
17+
; (In systemd 242 or below, you can use ExecStartPre= here.)
18+
ExecCondition=/usr/bin/step certificate needs-renewal $CERT_LOCATION
1919

2020
; ExecStart renews the certificate, if ExecStartPre was successful.
2121
ExecStart=/usr/bin/step ca renew --force $CERT_LOCATION $KEY_LOCATION

0 commit comments

Comments
 (0)