Merge pull request #40 from spikyjt/patch-1

POSIX compliant cron example
This commit is contained in:
Niklas Keller
2016-10-21 14:15:12 +02:00
committed by GitHub

View File

@@ -77,9 +77,10 @@ the script will be quiet to be cron friendly. If an error occurs, the script wil
You should execute `acme-client auto` as a daily cron. It's recommended to setup e-mail notifications for all output of
that script.
```bash
0 0 * * * acme-client auto; exit=$?; if [[ $exit = 4 ]] || [[ $exit = 5 ]]; then service nginx reload; fi
```sh
0 0 * * * /usr/local/sbin/acme-client auto; RC=$?; if [[ $RC = 4 ]] || [[ $RC = 5 ]]; then /usr/sbin/service nginx reload; fi
```
The path to `acme-client` should be modified to suit your system. The full path should be used as the system path may not be set up in your cron environment.
| Exit Code | Description |
|-----------|-------------|