useg bash in cronjob and stop script on SIGINT
This commit is contained in:
parent
e040516244
commit
6f26522bb9
@ -34,9 +34,9 @@ It will create the .csr and .key (4096 bit) file if they don't exists. Then issu
|
||||
## cronjob examples
|
||||
|
||||
```
|
||||
11 3 5 */2 * user sh /certs/renew_cert.sh domain.com
|
||||
11 3 5 */2 * user sh /certs/renew_cert.sh $(< /srv/certs/opt/domains) >> /certs/opt/renew_cert.log
|
||||
11 3 5 */2 * user sh /certs/renew_cert.sh $(< /srv/certs/opt/domains) >> /certs/opt/renew_cert.log && docker exec proxy nginx -s reload
|
||||
11 3 5 */2 * user bash /certs/renew_cert.sh domain.com
|
||||
11 3 5 */2 * user bash /certs/renew_cert.sh $(< /srv/certs/opt/domains) >> /certs/opt/renew_cert.log
|
||||
11 3 5 */2 * user bash /certs/renew_cert.sh $(< /srv/certs/opt/domains) >> /certs/opt/renew_cert.log && docker exec proxy nginx -s reload
|
||||
|
||||
```
|
||||
|
||||
|
@ -14,6 +14,9 @@ openssl_conf=$opt_dir/openssl.conf
|
||||
# script
|
||||
|
||||
|
||||
# stop script if receive SIGINT signal (ctrl-c)
|
||||
trap "exit" INT
|
||||
|
||||
# check if needed files are provided
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "No arguments provided."
|
||||
|
Loading…
x
Reference in New Issue
Block a user