Created
December 6, 2015 18:59
-
-
Save artmouse/660e7f028e2389e8f94e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/cron.d/ssl | |
5 00 */14 * * /opt/letsencrypt_yolo.sh 2>&1 | mail -s "reloading certificates" [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ $UID != 0 ]]; then | |
echo "please run as root" | |
exit 1 | |
fi | |
cd /opt/letsencrypt/ | |
git pull 2>&1 >> /dev/null | |
# Renewing the cert | |
./letsencrypt-auto certonly \ | |
-a webroot --webroot-path /srv/letsencrypt/www \ | |
-d jaime.les.poneys.roses.ru \ | |
--server https://acme-v01.api.letsencrypt.org/directory \ | |
--renew \ | |
2>&1 | |
/opt/letsencrypt_sync.sh | |
/opt/letsencrypt_reload.sh | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/etc/init.d/nginx restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cp -Lv /etc/letsencrypt/live/licorn.eu/* /srv/letsencrypt/ssl/ | |
chmod g-rwx /srv/letsencrypt/ssl/* | |
chmod o-rwx /srv/letsencrypt/ssl/* | |
touch /srv/letsencrypt/ssl/.reload_octavia | |
touch /srv/letsencrypt/ssl/.reload_derpy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -e /srv/letsencrypt/ssl/.reload_derpy ]; then | |
/etc/init.d/nginx restart | |
/etc/init.d/dovecot restart | |
/etc/init.d/opensmtpd restart | |
rm -vf /srv/letsencrypt/ssl/.reload_derpy | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/cron.d/ssl | |
1 00 */14 * * /opt/letsencrypt.sh 2>&1 | mail -s "certificate renewal report" [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment