mirror of
https://github.com/openoms/bitcoin-tutorials.git
synced 2025-12-19 04:54:18 +01:00
improve scripts
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
echo "Input your email:
|
||||
#!/bin/bash
|
||||
|
||||
echo "
|
||||
Input your email:
|
||||
"
|
||||
read EMAIL
|
||||
|
||||
echo "Input a subdomain set up with an A record pointing to this server:
|
||||
echo "
|
||||
Input a subdomain set up with an A record pointing to this server:
|
||||
eg.: mempool.example.com
|
||||
"
|
||||
read SUBDOMAIN
|
||||
|
||||
echo "Input the URL to be redirected to:
|
||||
echo "
|
||||
Input the URL to be redirected to:
|
||||
eg.: https://192.168.1.42:4081
|
||||
"
|
||||
read REDIRECT
|
||||
@@ -21,11 +26,10 @@ sudo certbot certonly -a standalone -m $EMAIL --agree-tos \
|
||||
#sudo cat /etc/letsencrypt/live/$SUBDOMAIN/privkey.pem
|
||||
|
||||
# Add to /etc/nginx/sites-available/btcpayserver
|
||||
echo "
|
||||
echo "\
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name $SUBDOMAIN;
|
||||
ssl on;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/$SUBDOMAIN/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/$SUBDOMAIN/privkey.pem;
|
||||
@@ -42,14 +46,13 @@ server {
|
||||
location / {
|
||||
proxy_pass $REDIRECT;
|
||||
}
|
||||
|
||||
}" | sudo tee /etc/nginx/sites-available/$SUBDOMAIN
|
||||
|
||||
|
||||
sudo nano /etc/nginx/sites-available/$SUBDOMAIN
|
||||
# edit with
|
||||
# sudo nano /etc/nginx/sites-available/$SUBDOMAIN
|
||||
|
||||
sudo ln -s /etc/nginx/sites-available/$SUBDOMAIN /etc/nginx/sites-enabled/
|
||||
|
||||
sudo nginx -t || exit 1
|
||||
|
||||
sudo systemctl restart nginx
|
||||
sudo systemctl reload nginx
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
echo "Input your email:
|
||||
#!/bin/bash
|
||||
|
||||
echo "
|
||||
Input your email:
|
||||
"
|
||||
read EMAIL
|
||||
|
||||
echo "Input a subdomain set up with an A record pointing to this server:
|
||||
echo "
|
||||
Input a subdomain set up with an A record pointing to this server:
|
||||
eg.: electrum.example.com
|
||||
"
|
||||
read SUBDOMAIN
|
||||
|
||||
echo "Input the TCP port of the Electrum Server to be redirected to:
|
||||
echo "
|
||||
Input the TCP port of the Electrum Server to be redirected to:
|
||||
eg.: https://192.168.1.42:50021
|
||||
"
|
||||
read REDIRECT
|
||||
@@ -73,4 +78,4 @@ stream {
|
||||
sudo nginx -t || exit 1
|
||||
|
||||
# restart
|
||||
sudo systemctl restart nginx
|
||||
sudo systemctl reload nginx
|
||||
|
||||
Reference in New Issue
Block a user