CRON example #161

Closed
opened 2025-12-29 00:26:17 +01:00 by adam · 3 comments
Owner

Originally created by @almereyda on GitHub (Nov 17, 2016).

I am creating new certificates with $ vim /root/renew.sh

#!/bin/sh

/root/github.com/lukas2511/dehydrated/dehydrated -c
/usr/sbin/nginx -t && /usr/sbin/nginx -s reload

and $ crontab -e

@daily /root/renew.sh

Should we add such a sample to the documentation?

Originally created by @almereyda on GitHub (Nov 17, 2016). I am creating new certificates with `$ vim /root/renew.sh` ``` #!/bin/sh /root/github.com/lukas2511/dehydrated/dehydrated -c /usr/sbin/nginx -t && /usr/sbin/nginx -s reload ``` and `$ crontab -e` ``` @daily /root/renew.sh ``` Should we add such a sample to the documentation?
adam closed this issue 2025-12-29 00:26:17 +01:00
Author
Owner

@lukas2511 commented on GitHub (Nov 17, 2016):

You could also reload nginx in a hook script and just use dehydrated -c in the cron, no need to write a wrapper script.

@lukas2511 commented on GitHub (Nov 17, 2016): You could also reload nginx in a hook script and just use `dehydrated -c` in the cron, no need to write a wrapper script.
Author
Owner

@almereyda commented on GitHub (Nov 24, 2016):

Thank you, yes, this is what I was missing.

@almereyda commented on GitHub (Nov 24, 2016): Thank you, yes, this is what I was missing.
Author
Owner

@TyrfingMjolnir commented on GitHub (Sep 18, 2017):

$ crontab -l www
55 23 * * * /opt/local/dehydrated/dehydrated -c; svcadm refresh nginx
@TyrfingMjolnir commented on GitHub (Sep 18, 2017): ``` $ crontab -l www 55 23 * * * /opt/local/dehydrated/dehydrated -c; svcadm refresh nginx ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#161