Created
June 27, 2023 16:29
-
-
Save lucassmacedo/ab901bd589df499f805fe1fe447cacb7 to your computer and use it in GitHub Desktop.
Renovação do SSL Automático.
This file contains 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/bash | |
# Executa a renovação do certificado usando o Certbot | |
certbot renew --quiet | |
# Verifica o status do certificado renovado | |
if [ $? -eq 0 ]; then | |
# Reinicia o Nginx se a renovação for bem-sucedida | |
service nginx restart | |
else | |
# Lida com qualquer erro ou falha na renovação | |
echo "Erro ao renovar o certificado SSL." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment