Просмотр исходного кода

Fix needs-renewal condition and switch to using ExecCondition

Carl Tashian 5 лет назад
Родитель
Сommit
22ef324534
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      systemd/cert-renewer@.service

+ 3 - 3
systemd/cert-renewer@.service

@@ -12,10 +12,10 @@ Environment=STEPPATH=/etc/step-ca \
             CERT_LOCATION=/etc/step/certs/%i.crt \
             CERT_LOCATION=/etc/step/certs/%i.crt \
             KEY_LOCATION=/etc/step/certs/%i.key
             KEY_LOCATION=/etc/step/certs/%i.key
 
 
-; ExecStartPre checks if the certificate is ready for renewal,
+; ExecCondition checks if the certificate is ready for renewal,
 ; based on the exit status of the command.
 ; based on the exit status of the command.
-; (In systemd 243 and above, you can use ExecCondition= here.)
-ExecStartPre=/usr/bin/step certificate needs-renewal $CERT_LOCATION --roots $STEPPATH/certs/root_ca.crt
+; (In systemd 242 or below, you can use ExecStartPre= here.)
+ExecCondition=/usr/bin/step certificate needs-renewal $CERT_LOCATION
 
 
 ; ExecStart renews the certificate, if ExecStartPre was successful.
 ; ExecStart renews the certificate, if ExecStartPre was successful.
 ExecStart=/usr/bin/step ca renew --force $CERT_LOCATION $KEY_LOCATION
 ExecStart=/usr/bin/step ca renew --force $CERT_LOCATION $KEY_LOCATION