Last active
September 30, 2018 20:16
-
-
Save msaulohenrique/5170966540674b0afb99e85724f2b7e7 to your computer and use it in GitHub Desktop.
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 -e | |
clear | |
YELLOW=`tput setaf 3` | |
GREEN=`tput setaf 2` | |
NC=`tput sgr0` | |
echo "${GREEN}" | |
echo "====================================================" | |
echo "Instalando SSL VOXTREAM" | |
echo "====================================================" | |
echo "${NC}" | |
echo "${YELLOW}Dominio (sem http/https ou www): ex. audiobrazil.com${NC}" | |
read -e dominio | |
echo "${YELLOW}E-mail${NC}" | |
read -e email | |
echo "${YELLOW}Deseja prosseguir? (y/n)${NC}" | |
read -e run | |
if [ "$run" == n ] ; then | |
exit | |
else | |
yum -y install mod_ssl git stunnel | |
cd /usr/local/ | |
git clone https://github.com/letsencrypt/letsencrypt | |
cd /usr/local/letsencrypt | |
./certbot-auto certonly --standalone --email $email -d $dominio -d www.$dominio -d player.$dominio -d cdn.$dominio -d srv01.$dominio | |
echo '45 2 * * 6 cd /usr/local/letsencrypt && ./certbot-auto renew' >> /var/spool/cron/root | |
echo 'client=no' >> /etc/stunnel/stunnel.conf | |
echo 'cert = /etc/letsencrypt/live/dominiosrv/fullchain.pem' >> /etc/stunnel/stunnel.conf | |
echo 'key = /etc/letsencrypt/live/dominiosrv/privkey.pem' >> /etc/stunnel/stunnel.conf | |
cd /etc/rc.d/init.d/ | |
wget https://gist.githubusercontent.com/msaulohenrique/6b63396707b3e64dae83be917f4ffd94/raw/455f996d54ed73b849add3958ae34ede05725b67/stunnel | |
chmod +x /etc/rc.d/init.d/stunnel | |
/etc/init.d/stunnel start | |
clear | |
echo "${GREEN}" | |
echo "=================================================================" | |
echo | |
echo "Concluído. :)" | |
echo | |
echo "=================================================================" | |
echo "${NC}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bash <(curl -L https://gist.githubusercontent.com/msaulohenrique/5170966540674b0afb99e85724f2b7e7/raw/8fd0a2670062fcb2da35903086d8166f2bdac7b8/ssl_vox.sh)