Conditionally reload a service from another service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What is the recommended way for a service that runs as a non-root user
to *conditionally* restart (or reload) another service?

I have created service (along with an associated timer) that checks the
remaining life of a TLS certificate and retrieves an updated certificate
from Let's Encrypt if the remaining life is too short.

I am trying to figure out the best way to restart Apache (httpd.service)
*if* the certificate is updated.

* My service runs as a non-root user, so (AFAIK), there is no way for it
  to directly restart httpd.  (At least not without all the pain of
  starting as root, dropping privileges, etc.)

* I could add 'ExecStartPost=systemctl reload httpd.service' to my unit
  file, but I don't believe that there's any way to make that
  conditional.

Any ideas?

Thanks!

--
========================================================================
Google                                      Where SkyNet meets Idiocracy
========================================================================



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux