2019-11-24 13:12:55 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# https://github.com/janoside/btc-rpc-explorer
|
|
|
|
# ~/.config/btc-rpc-explorer.env
|
|
|
|
# https://github.com/janoside/btc-rpc-explorer/blob/master/.env-sample
|
|
|
|
|
|
|
|
# command info
|
|
|
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# small config script to switch BTC-RPC-explorer on or off"
|
|
|
|
echo "# bonus.btc-rpc-explorer.sh [status|on|off]"
|
2021-09-16 15:19:40 +02:00
|
|
|
echo "# bonus.btc-rpc-explorer.sh prestart"
|
2019-11-24 13:12:55 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-12-19 00:00:07 +01:00
|
|
|
source /mnt/hdd/raspiblitz.conf
|
2020-01-11 09:38:17 +00:00
|
|
|
|
2020-01-27 02:20:18 +01:00
|
|
|
# show info menu
|
|
|
|
if [ "$1" = "menu" ]; then
|
|
|
|
|
2020-01-27 02:33:04 +01:00
|
|
|
# get status
|
|
|
|
echo "# collecting status info ... (please wait)"
|
|
|
|
source <(sudo /home/admin/config.scripts/bonus.btc-rpc-explorer.sh status)
|
|
|
|
|
|
|
|
# check if index is ready
|
2020-06-29 04:44:32 +02:00
|
|
|
if [ "${isIndexed}" == "0" ]; then
|
2020-01-27 02:33:04 +01:00
|
|
|
dialog --title " Blockchain Index Not Ready " --msgbox "
|
2020-08-13 15:45:27 +02:00
|
|
|
The Blockchain Index is still getting built.
|
2020-06-29 04:46:41 +02:00
|
|
|
${indexInfo}
|
2020-01-27 02:33:04 +01:00
|
|
|
This can take multiple hours.
|
|
|
|
" 9 48
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2020-01-27 02:20:18 +01:00
|
|
|
# get network info
|
2021-08-04 00:18:30 +02:00
|
|
|
localip=$(ip addr | grep 'state UP' -A2 | grep -E -v 'docker0|veth' | grep 'eth0\|wlan0\|enp0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
2020-01-27 02:20:18 +01:00
|
|
|
toraddress=$(sudo cat /mnt/hdd/tor/btc-rpc-explorer/hostname 2>/dev/null)
|
2020-06-29 15:35:13 +02:00
|
|
|
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)
|
2020-01-27 02:20:18 +01:00
|
|
|
|
|
|
|
if [ "${runBehindTor}" = "on" ] && [ ${#toraddress} -gt 0 ]; then
|
|
|
|
|
|
|
|
# TOR
|
2021-04-08 00:02:57 +02:00
|
|
|
/home/admin/config.scripts/blitz.display.sh qr "${toraddress}"
|
2021-04-18 18:04:59 +02:00
|
|
|
whiptail --title " BTC-RPC-Explorer " --msgbox "Open in your local web browser:
|
|
|
|
http://${localip}:3020\n
|
|
|
|
https://${localip}:3021 with Fingerprint:
|
2020-06-29 15:35:13 +02:00
|
|
|
${fingerprint}\n
|
2020-01-27 03:13:48 +01:00
|
|
|
Login is 'admin' with your Password B\n
|
2020-01-27 02:20:18 +01:00
|
|
|
Hidden Service address for TOR Browser (QR see LCD):
|
|
|
|
${toraddress}
|
2020-06-29 16:07:12 +02:00
|
|
|
" 16 67
|
2021-04-08 00:02:57 +02:00
|
|
|
/home/admin/config.scripts/blitz.display.sh hide
|
2020-01-27 02:20:18 +01:00
|
|
|
else
|
|
|
|
|
|
|
|
# IP + Domain
|
2021-04-18 18:04:59 +02:00
|
|
|
whiptail --title " BTC-RPC-Explorer " --msgbox "Open in your local web browser:
|
|
|
|
http://${localip}:3020\n
|
|
|
|
https://${localip}:3021 with Fingerprint:
|
2020-06-29 15:35:13 +02:00
|
|
|
${fingerprint}\n
|
2020-01-27 03:13:48 +01:00
|
|
|
Login is 'admin' with your Password B\n
|
2020-01-27 02:20:18 +01:00
|
|
|
Activate TOR to access the web block explorer from outside your local network.
|
2020-06-29 16:07:12 +02:00
|
|
|
" 16 54
|
2020-01-27 02:20:18 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "please wait ..."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2020-01-11 09:38:17 +00:00
|
|
|
# add default value to raspi config if needed
|
|
|
|
if ! grep -Eq "^BTCRPCexplorer=" /mnt/hdd/raspiblitz.conf; then
|
2019-12-18 22:50:42 +01:00
|
|
|
echo "BTCRPCexplorer=off" >> /mnt/hdd/raspiblitz.conf
|
|
|
|
fi
|
2019-11-24 13:12:55 +00:00
|
|
|
|
2019-12-18 22:50:42 +01:00
|
|
|
# status
|
|
|
|
if [ "$1" = "status" ]; then
|
|
|
|
|
|
|
|
if [ "${BTCRPCexplorer}" = "on" ]; then
|
|
|
|
echo "configured=1"
|
|
|
|
|
|
|
|
# check indexing
|
|
|
|
source <(sudo /home/admin/config.scripts/network.txindex.sh status)
|
|
|
|
echo "isIndexed=${isIndexed}"
|
2019-12-18 22:59:12 +01:00
|
|
|
echo "indexInfo='${indexInfo}'"
|
2019-12-18 22:50:42 +01:00
|
|
|
|
2020-01-22 11:37:42 +01:00
|
|
|
# check for error
|
|
|
|
isDead=$(sudo systemctl status btc-rpc-explorer | grep -c 'inactive (dead)')
|
|
|
|
if [ ${isDead} -eq 1 ]; then
|
|
|
|
echo "error='Service Failed'"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-12-18 22:50:42 +01:00
|
|
|
else
|
|
|
|
echo "configured=0"
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2019-11-24 13:12:55 +00:00
|
|
|
# stop service
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# making sure services are not running"
|
2019-11-24 13:12:55 +00:00
|
|
|
sudo systemctl stop btc-rpc-explorer 2>/dev/null
|
|
|
|
|
|
|
|
# switch on
|
|
|
|
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# *** INSTALL BTC-RPC-EXPLORER ***"
|
2019-11-24 13:12:55 +00:00
|
|
|
|
|
|
|
isInstalled=$(sudo ls /etc/systemd/system/btc-rpc-explorer.service 2>/dev/null | grep -c 'btc-rpc-explorer.service')
|
|
|
|
if [ ${isInstalled} -eq 0 ]; then
|
|
|
|
|
|
|
|
# install nodeJS
|
2020-05-29 15:21:38 +01:00
|
|
|
/home/admin/config.scripts/bonus.nodejs.sh on
|
2019-11-24 13:12:55 +00:00
|
|
|
|
2019-12-18 22:22:19 +01:00
|
|
|
# make sure that txindex of blockchain is switched on
|
2019-11-24 13:12:55 +00:00
|
|
|
/home/admin/config.scripts/network.txindex.sh on
|
2020-03-10 11:20:31 +00:00
|
|
|
|
|
|
|
# add btcrpcexplorer user
|
|
|
|
sudo adduser --disabled-password --gecos "" btcrpcexplorer
|
2019-11-24 13:12:55 +00:00
|
|
|
|
2020-03-10 11:20:31 +00:00
|
|
|
# install btc-rpc-explorer
|
|
|
|
cd /home/btcrpcexplorer
|
|
|
|
sudo -u btcrpcexplorer git clone https://github.com/janoside/btc-rpc-explorer.git
|
|
|
|
cd btc-rpc-explorer
|
2021-08-26 20:50:05 +02:00
|
|
|
sudo -u btcrpcexplorer git reset --hard v3.2.0
|
2020-03-10 11:20:31 +00:00
|
|
|
sudo -u btcrpcexplorer npm install
|
2020-08-06 14:25:00 +02:00
|
|
|
if ! [ $? -eq 0 ]; then
|
|
|
|
echo "FAIL - npm install did not run correctly, aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
2019-11-24 13:12:55 +00:00
|
|
|
|
|
|
|
# prepare .env file
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# getting RPC credentials from the ${network}.conf"
|
2019-11-24 13:12:55 +00:00
|
|
|
|
2019-12-18 22:22:19 +01:00
|
|
|
RPC_USER=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcuser | cut -c 9-)
|
|
|
|
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
2019-11-24 13:12:55 +00:00
|
|
|
|
|
|
|
touch /home/admin/btc-rpc-explorer.env
|
2020-03-10 11:20:31 +00:00
|
|
|
sudo chmod 600 /home/admin/btc-rpc-explorer.env || exit 1
|
2019-11-24 13:12:55 +00:00
|
|
|
cat > /home/admin/btc-rpc-explorer.env <<EOF
|
|
|
|
# Host/Port to bind to
|
|
|
|
# Defaults: shown
|
|
|
|
BTCEXP_HOST=0.0.0.0
|
2020-06-09 11:24:53 +01:00
|
|
|
BTCEXP_PORT=3020
|
2019-11-24 13:12:55 +00:00
|
|
|
# Bitcoin RPC Credentials (URI -OR- HOST/PORT/USER/PASS)
|
|
|
|
# Defaults:
|
|
|
|
# - [host/port]: 127.0.0.1:8332
|
|
|
|
# - [username/password]: none
|
|
|
|
# - cookie: '~/.bitcoin/.cookie'
|
|
|
|
# - timeout: 5000 (ms)
|
2020-03-10 11:20:31 +00:00
|
|
|
BTCEXP_BITCOIND_HOST=127.0.0.1
|
|
|
|
BTCEXP_BITCOIND_PORT=8332
|
2019-11-24 13:12:55 +00:00
|
|
|
BTCEXP_BITCOIND_USER=$RPC_USER
|
|
|
|
BTCEXP_BITCOIND_PASS=$PASSWORD_B
|
|
|
|
#BTCEXP_BITCOIND_COOKIE=/path/to/bitcoind/.cookie
|
2020-03-10 11:20:31 +00:00
|
|
|
BTCEXP_BITCOIND_RPC_TIMEOUT=10000
|
2021-08-27 07:48:29 +00:00
|
|
|
# Privacy mode disables:
|
|
|
|
# Exchange-rate queries, IP-geolocation queries
|
|
|
|
# Default: false
|
|
|
|
BTCEXP_PRIVACY_MODE=true
|
2019-11-24 13:12:55 +00:00
|
|
|
# Password protection for site via basic auth (enter any username, only the password is checked)
|
|
|
|
# Default: none
|
|
|
|
BTCEXP_BASIC_AUTH_PASSWORD=$PASSWORD_B
|
|
|
|
# Select optional "address API" to display address tx lists and balances
|
|
|
|
# Options: electrumx, blockchain.com, blockchair.com, blockcypher.com
|
|
|
|
# If electrumx set, the BTCEXP_ELECTRUMX_SERVERS variable must also be
|
|
|
|
# set.
|
|
|
|
# Default: none
|
2019-12-11 13:44:29 +00:00
|
|
|
BTCEXP_ADDRESS_API=none
|
|
|
|
BTCEXP_ELECTRUMX_SERVERS=tcp://127.0.0.1:50001
|
2019-11-24 13:12:55 +00:00
|
|
|
EOF
|
2020-03-10 11:20:31 +00:00
|
|
|
sudo mv /home/admin/btc-rpc-explorer.env /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
|
|
|
sudo chown btcrpcexplorer:btcrpcexplorer /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
2019-11-24 13:12:55 +00:00
|
|
|
|
|
|
|
# open firewall
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# *** Updating Firewall ***"
|
2020-06-10 21:23:17 +01:00
|
|
|
sudo ufw allow 3020 comment 'btc-rpc-explorer HTTP'
|
|
|
|
sudo ufw allow 3021 comment 'btc-rpc-explorer HTTPS'
|
2019-11-24 13:12:55 +00:00
|
|
|
echo ""
|
|
|
|
|
2020-06-09 21:18:47 +01:00
|
|
|
|
|
|
|
##################
|
|
|
|
# NGINX
|
|
|
|
##################
|
|
|
|
# setup nginx symlinks
|
|
|
|
if ! [ -f /etc/nginx/sites-available/btcrpcexplorer_ssl.conf ]; then
|
|
|
|
sudo cp /home/admin/assets/nginx/sites-available/btcrpcexplorer_ssl.conf /etc/nginx/sites-available/btcrpcexplorer_ssl.conf
|
|
|
|
fi
|
|
|
|
if ! [ -f /etc/nginx/sites-available/btcrpcexplorer_tor.conf ]; then
|
|
|
|
sudo cp /home/admin/assets/nginx/sites-available/btcrpcexplorer_tor.conf /etc/nginx/sites-available/btcrpcexplorer_tor.conf
|
|
|
|
fi
|
|
|
|
if ! [ -f /etc/nginx/sites-available/btcrpcexplorer_tor_ssl.conf ]; then
|
|
|
|
sudo cp /home/admin/assets/nginx/sites-available/btcrpcexplorer_tor_ssl.conf /etc/nginx/sites-available/btcrpcexplorer_tor_ssl.conf
|
|
|
|
fi
|
|
|
|
sudo ln -sf /etc/nginx/sites-available/btcrpcexplorer_ssl.conf /etc/nginx/sites-enabled/
|
|
|
|
sudo ln -sf /etc/nginx/sites-available/btcrpcexplorer_tor.conf /etc/nginx/sites-enabled/
|
|
|
|
sudo ln -sf /etc/nginx/sites-available/btcrpcexplorer_tor_ssl.conf /etc/nginx/sites-enabled/
|
|
|
|
sudo nginx -t
|
|
|
|
sudo systemctl reload nginx
|
|
|
|
|
2019-11-24 13:12:55 +00:00
|
|
|
# install service
|
|
|
|
echo "*** Install btc-rpc-explorer systemd ***"
|
|
|
|
cat > /home/admin/btc-rpc-explorer.service <<EOF
|
|
|
|
# systemd unit for BTC RPC Explorer
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=btc-rpc-explorer
|
2019-12-18 22:22:19 +01:00
|
|
|
Wants=${network}d.service
|
|
|
|
After=${network}d.service
|
2019-11-24 13:12:55 +00:00
|
|
|
|
|
|
|
[Service]
|
2021-09-16 15:19:40 +02:00
|
|
|
User=btcrpcexplorer
|
|
|
|
ExecStartPre=-/home/admin/config.scripts/bonus.btc-rpc-explorer.sh prestart
|
2020-03-10 11:20:31 +00:00
|
|
|
WorkingDirectory=/home/btcrpcexplorer/btc-rpc-explorer
|
|
|
|
ExecStart=/usr/bin/npm start
|
2020-09-07 12:25:56 +02:00
|
|
|
# Restart on failure but no more than default times (DefaultStartLimitBurst=5) every 10 minutes (600 seconds). Otherwise stop
|
2020-03-10 11:20:31 +00:00
|
|
|
Restart=on-failure
|
2020-09-07 12:25:56 +02:00
|
|
|
RestartSec=600
|
2019-11-24 13:12:55 +00:00
|
|
|
|
2021-08-04 00:18:30 +02:00
|
|
|
# Hardening measures
|
|
|
|
PrivateTmp=true
|
|
|
|
ProtectSystem=full
|
|
|
|
NoNewPrivileges=true
|
|
|
|
PrivateDevices=true
|
|
|
|
|
2019-11-24 13:12:55 +00:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
EOF
|
|
|
|
|
|
|
|
sudo mv /home/admin/btc-rpc-explorer.service /etc/systemd/system/btc-rpc-explorer.service
|
|
|
|
sudo systemctl enable btc-rpc-explorer
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# OK - the BTC-RPC-explorer service is now enabled"
|
2019-11-24 13:12:55 +00:00
|
|
|
|
|
|
|
else
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# BTC-RPC-explorer already installed."
|
2019-11-24 13:12:55 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# setting value in raspi blitz config
|
|
|
|
sudo sed -i "s/^BTCRPCexplorer=.*/BTCRPCexplorer=on/g" /mnt/hdd/raspiblitz.conf
|
|
|
|
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# needs to finish creating txindex to be functional"
|
|
|
|
echo "# monitor with: sudo tail -n 20 -f /mnt/hdd/bitcoin/debug.log"
|
2021-09-14 18:06:13 +02:00
|
|
|
echo "# npm audi fix"
|
2021-09-14 16:05:03 +00:00
|
|
|
cd /home/btcrpcexplorer/btc-rpc-explorer/
|
2021-09-14 18:06:13 +02:00
|
|
|
sudo npm audit fix
|
2019-11-24 13:12:55 +00:00
|
|
|
|
2019-12-11 13:44:29 +00:00
|
|
|
## Enable BTCEXP_ADDRESS_API if BTC-RPC-Explorer is active
|
2019-12-25 08:28:01 +01:00
|
|
|
# see /home/admin/config.scripts/bonus.electrsexplorer.sh
|
|
|
|
# run every 10 min by _background.sh
|
2019-12-11 13:44:29 +00:00
|
|
|
|
2019-11-24 13:12:55 +00:00
|
|
|
# Hidden Service for BTC-RPC-explorer if Tor is active
|
|
|
|
source /mnt/hdd/raspiblitz.conf
|
|
|
|
if [ "${runBehindTor}" = "on" ]; then
|
2020-07-18 15:26:56 +02:00
|
|
|
# make sure to keep in sync with internet.tor.sh script
|
2020-06-09 21:18:47 +01:00
|
|
|
/home/admin/config.scripts/internet.hiddenservice.sh btc-rpc-explorer 80 3022 443 3023
|
2019-11-24 13:12:55 +00:00
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2021-09-16 15:19:40 +02:00
|
|
|
##########################
|
|
|
|
# PRESTART
|
|
|
|
# - will be called as prestart by systemd service (as user btcrpcexplorer)
|
|
|
|
#########################
|
|
|
|
|
|
|
|
if [ "$1" = "prestart" ]; then
|
|
|
|
|
|
|
|
# users need to be `btcrpcexplorer` so that it can be run by systemd as prestart (no SUDO available)
|
|
|
|
if [ "$USER" != "btcrpcexplorer" ]; then
|
|
|
|
echo "# FAIL: run as user btcrpcexplorer"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "## btc-rpc-explorer.service PRESTART CONFIG"
|
|
|
|
|
|
|
|
echo "# TODO: check generel config ..."
|
|
|
|
|
|
|
|
# check if electrs is installed & running
|
|
|
|
if [ "${ElectRS}" == "on" ]; then
|
|
|
|
|
|
|
|
# CHECK THAT ELECTRS IS PART OF CONFIG
|
|
|
|
echo "# TODO: check electrs config ..."
|
|
|
|
|
|
|
|
# CHECK THAT ELECTRS INDEX IS BUILD
|
|
|
|
# electrs listening in port 50001 means index is build
|
|
|
|
echo "# electrs is on .. checking if index is build"
|
|
|
|
echo "# waiting electrs on port 50001 (= index is ready)"
|
|
|
|
while [ $(netstat | grep -c "50001") -eq 0 ]; do
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "# electrs started, launching BTC-RPC-Explorer ..."
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2019-11-24 13:12:55 +00:00
|
|
|
# switch off
|
|
|
|
if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
|
|
|
|
|
|
|
# setting value in raspi blitz config
|
|
|
|
sudo sed -i "s/^BTCRPCexplorer=.*/BTCRPCexplorer=off/g" /mnt/hdd/raspiblitz.conf
|
|
|
|
|
|
|
|
isInstalled=$(sudo ls /etc/systemd/system/btc-rpc-explorer.service 2>/dev/null | grep -c 'btc-rpc-explorer.service')
|
|
|
|
if [ ${isInstalled} -eq 1 ]; then
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# *** REMOVING BTC-RPC-explorer ***"
|
2019-11-24 13:12:55 +00:00
|
|
|
sudo systemctl disable btc-rpc-explorer
|
|
|
|
sudo rm /etc/systemd/system/btc-rpc-explorer.service
|
2020-06-09 11:24:53 +01:00
|
|
|
# delete user and home directory
|
|
|
|
sudo userdel -rf btcrpcexplorer
|
2020-06-09 21:18:47 +01:00
|
|
|
|
2020-06-11 15:32:00 +01:00
|
|
|
# remove nginx symlinks
|
2020-06-09 21:18:47 +01:00
|
|
|
sudo rm -f /etc/nginx/sites-enabled/btcrpcexplorer_ssl.conf
|
|
|
|
sudo rm -f /etc/nginx/sites-enabled/btcrpcexplorer_tor.conf
|
|
|
|
sudo rm -f /etc/nginx/sites-enabled/btcrpcexplorer_tor_ssl.conf
|
2020-06-26 22:57:12 +02:00
|
|
|
sudo rm -f /etc/nginx/sites-available/btcrpcexplorer_ssl.conf
|
|
|
|
sudo rm -f /etc/nginx/sites-available/btcrpcexplorer_tor.conf
|
|
|
|
sudo rm -f /etc/nginx/sites-available/btcrpcexplorer_tor_ssl.conf
|
2020-06-09 21:18:47 +01:00
|
|
|
sudo nginx -t
|
|
|
|
sudo systemctl reload nginx
|
|
|
|
|
2020-07-12 20:05:41 +02:00
|
|
|
# Hidden Service if Tor is active
|
|
|
|
if [ "${runBehindTor}" = "on" ]; then
|
2020-07-18 15:26:56 +02:00
|
|
|
# make sure to keep in sync with internet.tor.sh script
|
2020-07-12 20:05:41 +02:00
|
|
|
/home/admin/config.scripts/internet.hiddenservice.sh off btc-rpc-explorer
|
|
|
|
fi
|
|
|
|
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# OK BTC-RPC-explorer removed."
|
2020-06-09 21:18:47 +01:00
|
|
|
|
2019-11-24 13:12:55 +00:00
|
|
|
else
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "# BTC-RPC-explorer is not installed."
|
2019-11-24 13:12:55 +00:00
|
|
|
fi
|
2020-06-09 11:24:53 +01:00
|
|
|
|
2020-06-10 21:23:17 +01:00
|
|
|
# close ports on firewall
|
2020-06-09 11:24:53 +01:00
|
|
|
sudo ufw deny 3020
|
2020-06-10 21:23:17 +01:00
|
|
|
sudo ufw deny 3021
|
2019-11-24 13:12:55 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2020-06-29 14:49:12 +02:00
|
|
|
echo "error='unknown parameter'
|
2020-01-02 19:39:31 +00:00
|
|
|
exit 1
|