Advertisement
Typhoon

Letsencrypt Certificate Renew on GitLab

Apr 29th, 2016
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.52 KB | None | 0 0
  1. #!/bin/bash
  2. killall letsencrypt
  3. killall letsencrypt-auto
  4. sleep 5
  5.  
  6. DATE=$(date +"%Y-%m-%d %T")
  7. echo "$DATE LetsEncrypt Certificate renew"
  8.  
  9. echo "Stopping NginX"
  10. /usr/bin/gitlab-ctl stop nginx
  11.  
  12. sleep 10
  13. /opt/letsencrypt/letsencrypt-auto certonly --standalone --renew-by-default --email info@mydomain.sk --text --agree-tos -d git.mydomain.sk -d wiki.mydomain.sk
  14.  
  15. echo "Starting NginX"
  16. /usr/bin/gitlab-ctl start nginx
  17.  
  18. exit
  19.  
  20. #crontab -l : "0 0 1 * * /usr/local/bin/letsencrypt_renew >> /var/log/letsencrypt_renew.log"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement