I'm using Let's Encrypt to generate SSL certificates automatically every 60-days using a simple shell script.
After the script has reloaded these it tries to reload my services using the commands I would type myself into a shell, i.e-
service postfix reload and
service dovecot reload.
However, while the first of these works just fine, the
service dovecot reload does not work, complaining of an unrecognised service.
The script is being run as root as a cron-job, so I would expect it to recognise all the same services as when I'm logged in as root myself, yet for some reason dovecot is not recognised, but others are without issue, meaning I have to manually reload dovecot before the old certificates expire, kind of limiting the benefit of my script!
What is different about dovecot that would cause it to be unrecognised by my script, but be recognised without issue when I log in as root myself?