From dd892e9bf6218ef007bc3fa3095b934455cac383 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 18 Sep 2019 13:08:09 +0100 Subject: [PATCH] electrs: simplify SSL setup and update uninstall --- electrs/3_Nginx_and_Certbot_for_SSL.sh | 25 ++++++++++--------- .../revert_ electrs_automation_for_Eclair.sh | 24 ++++++++++-------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/electrs/3_Nginx_and_Certbot_for_SSL.sh b/electrs/3_Nginx_and_Certbot_for_SSL.sh index 4071b9b..97f40fb 100644 --- a/electrs/3_Nginx_and_Certbot_for_SSL.sh +++ b/electrs/3_Nginx_and_Certbot_for_SSL.sh @@ -9,6 +9,17 @@ # Forward port 50002 to be able to access you electrs from outside of your LAN # https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md + +echo "" +echo "***" +echo "Please type the domain/dynamicDNS you want to use for Electrs followed by [ENTER]" +read YOUR_DOMAIN + +echo "" +echo "***" +echo "Please confirm that the port 80 is forwarded to the IP of the RaspiBlitz by pressing [ENTER]" +read key + echo "" echo "***" echo "installing Nginx" @@ -18,11 +29,6 @@ echo "" sudo apt-get install -y nginx sudo /etc/init.d/nginx start -echo "" -echo "***" -echo "Please confirm that the port 80 is forwarded to the IP of the RaspiBlitz by pressing [ENTER]" -read key - echo "allow port 80 on ufw" sudo ufw allow 80 @@ -87,11 +93,6 @@ RestartSec=60 sudo systemctl enable certbot.timer -echo "" -echo "***" -echo "Please type the domain/ddns you have generated the certificate for followed by [ENTER]" -read YOUR_DOMAIN - echo "Setting up nginx.conf" echo "***" echo "" @@ -115,7 +116,7 @@ stream { proxy_pass electrs; ssl_certificate /etc/letsencrypt/live/$YOUR_DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/$YOUR_DOMAIN/privkey.pem; - ssl_session_cache shared:SSL:1m; + ssl_session_cache shared:SSL-electrs:1m; ssl_session_timeout 4h; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; @@ -134,7 +135,7 @@ stream { proxy_pass electrs; ssl_certificate /etc/letsencrypt/live/$YOUR_DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/$YOUR_DOMAIN/privkey.pem; - ssl_session_cache shared:SSL:1m; + ssl_session_cache shared:SSL-electrs:1m; ssl_session_timeout 4h; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; diff --git a/electrs/config.scripts/revert_ electrs_automation_for_Eclair.sh b/electrs/config.scripts/revert_ electrs_automation_for_Eclair.sh index 875c295..d0316c4 100644 --- a/electrs/config.scripts/revert_ electrs_automation_for_Eclair.sh +++ b/electrs/config.scripts/revert_ electrs_automation_for_Eclair.sh @@ -1,13 +1,15 @@ - - -sudo systemctl stop nginx -sudo systemctl disable nginx -sudo apt remove -y nginx - -sudo sytemctl stop certbot -sudo sytemctl disable certbot -sudo rm /etc/systemd/system/certbot.service -sudo rm certbot* - sudo systemctl stop electrs sudo systemctl disable electrs + +#sudo systemctl stop nginx +#sudo systemctl disable nginx +#sudo apt remove -y nginx + +#sudo sytemctl stop certbot +#sudo sytemctl disable certbot +#sudo rm /etc/systemd/system/certbot.service +#sudo rm certbot* + +#https://doc.rust-lang.org/1.0.0/book/installing-rust.html +#sudo /usr/local/lib/rustlib/uninstall.sh +