Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lucassmacedo/ab901bd589df499f805fe1fe447cacb7 to your computer and use it in GitHub Desktop.
Save lucassmacedo/ab901bd589df499f805fe1fe447cacb7 to your computer and use it in GitHub Desktop.
Renovação do SSL Automático.
#!/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