0

I have a script that updates my ssl certificates and reloads squid to make it update its certificate once it is regenerated:

certbot renew
service squid reload

I put it to /etc/cron.monthly/certbot-renew.sh to make it run monthly as root.

The certificates are updated, but squid stops working each time its certificate is changed. If I do

service squid reload

manually it starts to work. I cannot figure out what is happening because there is only the information on manual squid reload in syslog:

sudo grep squid /var/log/syslog
Dec 23 20:39:11 localhost squid[8363]:  * Reloading Squid HTTP Proxy configuration files
Dec 23 20:39:11 localhost squid[8363]:    ...done.

The command

sudo grep CRON /var/log/syslog

does not show anything concerning to squid.

what is wrong with cron? If I run the script manually

sudo ./certbot-renew.sh

squid is restarted and "Reloading Squid ..." appears in syslog.

See how I installed certbot and how I installed squid to take the entire picture of what I do.

dmitriano
  • 237
  • 3
  • 8

1 Answers1

1

I just had a similar problem with reloading nginx via cron. It seems like the service ... command is completely ignored. Nothing in syslog, nothing in nginx logs.

I switched to using systemctl reload nginx instead, and this seems to work.

decibyte
  • 356