JessThrysoee / synology-letsencrypt

94 stars 31 forks source link

Reload DirectoryServer if it is running #21

Closed prabirshrestha closed 3 weeks ago

prabirshrestha commented 3 weeks ago

If the DirectoryServer is running it restarts so the new certs are picked up.

Fixes https://github.com/JessThrysoee/synology-letsencrypt/issues/20. This allows us to correctly bind to the LDAP server instead of getting cert issue.

I have added a generic function so in future more packages can be restarted if necessary.

JessThrysoee commented 3 weeks ago

Thank you for taking the time to suggest a solution.

This caused me to take a closer look into why some services are not reloaded.

It turn out that some DSM7 directories was missed. I have commited a general fix that now reload all services that are associated with the certificate.

See https://github.com/JessThrysoee/synology-letsencrypt/commit/1c6ca0ab1f61df414def7a0cc337772a89167830