Whirlpool tweaks
This commit is contained in:
parent
0ce9cea96c
commit
589b6eb288
|
@ -25,6 +25,7 @@ ufw allow 3002 comment 'allow BTC RPC Explorer'
|
|||
ufw allow 3010 comment 'allow RTL'
|
||||
ufw allow 4080 comment 'allow mempool.space'
|
||||
ufw allow 5353 comment 'allow Avahi'
|
||||
ufw allow 8899 comment 'allow Whirlpool'
|
||||
ufw allow 50001 comment 'allow Electrum Server'
|
||||
ufw allow 50002 comment 'allow Electrum Server'
|
||||
ufw allow 56881 comment 'allow myNode QuickSync'
|
||||
|
@ -35,7 +36,7 @@ ufw allow 51194 comment 'allow VPN'
|
|||
ufw allow 61208 comment 'allow glances'
|
||||
ufw allow from 127.0.0.1 comment 'allow from localhost'
|
||||
ufw allow from ::1 comment 'allow from localhost'
|
||||
ufw allow 8899 comment 'allow Whirlpool'
|
||||
|
||||
# Enable UFW
|
||||
ufw --force enable
|
||||
|
||||
|
|
|
@ -26,37 +26,13 @@ apt-get -y install pv sysstat network-manager unzip pkg-config libfreetype6-dev
|
|||
apt-get -y install libatlas-base-dev libffi-dev libssl-dev glances python3-bottle
|
||||
apt-get -y -qq install apt-transport-https ca-certificates
|
||||
apt-get -y install libgmp-dev automake libtool libltdl-dev libltdl7
|
||||
apt-get -y install xorg chromium openbox lightdm
|
||||
apt-get -y install xorg chromium openbox lightdm openjdk-8-jre
|
||||
|
||||
# Make sure some software is removed
|
||||
apt-get -y purge ntp # (conflicts with systemd-timedatectl)
|
||||
apt-get -y purge chrony # (conflicts with systemd-timedatectl)
|
||||
|
||||
|
||||
# Install Whirlpool
|
||||
apt -y install openjdk-8-jre
|
||||
|
||||
WHIRLPOOL_UPGRADE_URL=https://github.com/Samourai-Wallet/whirlpool-client-cli/releases/download/0.9.3/whirlpool-client-cli-0.9.3-run.jar
|
||||
WHIRLPOOL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.whirlpool_url
|
||||
CURRENT=""
|
||||
if [ -f $WHIRLPOOL_UPGRADE_URL_FILE ]; then
|
||||
CURRENT=$(cat $WHIRLPOOL_UPGRADE_URL_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$WHIRLPOOL_UPGRADE_URL" ]; then
|
||||
if [ ! -d /opt/mynode/whirlpool ]; then
|
||||
sudo -u bitcoin mkdir -p /opt/mynode/whirlpool
|
||||
cd /opt/mynode/whirlpool
|
||||
else
|
||||
cd /opt/mynode/whirlpool
|
||||
sudo rm -rf *.jar
|
||||
fi
|
||||
sudo -u bitcoin wget -O whirlpool.jar $WHIRLPOOL_UPGRADE_URL
|
||||
|
||||
mkdir -p /home/bitcoin/.mynode/
|
||||
chown -R bitcoin:bitcoin /home/bitcoin/.mynode/
|
||||
echo $WHIRLPOOL_UPGRADE_URL > $WHIRLPOOL_UPGRADE_URL_FILE
|
||||
fi
|
||||
|
||||
# Install any pip software
|
||||
pip install tzupdate virtualenv --no-cache-dir
|
||||
|
||||
|
@ -229,6 +205,22 @@ if [ $IS_PREMIUM -eq 1 ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Install Whirlpool
|
||||
WHIRLPOOL_UPGRADE_URL=https://github.com/Samourai-Wallet/whirlpool-client-cli/releases/download/0.9.3/whirlpool-client-cli-0.9.3-run.jar
|
||||
WHIRLPOOL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.whirlpool_url
|
||||
CURRENT=""
|
||||
if [ -f $WHIRLPOOL_UPGRADE_URL_FILE ]; then
|
||||
CURRENT=$(cat $WHIRLPOOL_UPGRADE_URL_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$WHIRLPOOL_UPGRADE_URL" ]; then
|
||||
sudo -u bitcoin mkdir -p /opt/mynode/whirlpool
|
||||
cd /opt/mynode/whirlpool
|
||||
sudo rm -rf *.jar
|
||||
sudo -u bitcoin wget -O whirlpool.jar $WHIRLPOOL_UPGRADE_URL
|
||||
|
||||
echo $WHIRLPOOL_UPGRADE_URL > $WHIRLPOOL_UPGRADE_URL_FILE
|
||||
fi
|
||||
|
||||
# Upgrade RTL
|
||||
RTL_UPGRADE_URL=https://github.com/Ride-The-Lightning/RTL/archive/v0.5.4.tar.gz
|
||||
RTL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.rtl_url
|
||||
|
@ -323,7 +315,6 @@ systemctl enable docker_images
|
|||
systemctl enable glances
|
||||
systemctl enable netdata
|
||||
systemctl enable webssh2
|
||||
systemctl enable whirlpool
|
||||
|
||||
# Disable any old services
|
||||
systemctl disable hitch
|
||||
|
|
|
@ -7,6 +7,7 @@ systemctl stop netdata
|
|||
systemctl stop glances
|
||||
systemctl stop rtl
|
||||
systemctl stop webssh2
|
||||
systemctl stop whirlpool
|
||||
|
||||
# Stop core services
|
||||
systemctl stop electrs
|
||||
|
|
|
@ -23,7 +23,7 @@ def get_whirlpool_status():
|
|||
whirlpool_status = "Running"
|
||||
whirlpool_status_color = "green"
|
||||
else:
|
||||
whirlpool_status = "Waiting for initialization."
|
||||
whirlpool_status = "Waiting for initialization..."
|
||||
whirlpool_status_color = "yellow"
|
||||
return whirlpool_status, whirlpool_status_color, whirlpool_initialized
|
||||
|
||||
|
@ -55,6 +55,5 @@ def whirlpool_page():
|
|||
@mynode_whirlpool.route("/restart-whirlpool")
|
||||
def page_toggle_whirlpool():
|
||||
check_logged_in()
|
||||
disable_whirlpool()
|
||||
enable_whirlpool()
|
||||
os.system("systemctl restart whirlpool --no-pager")
|
||||
return redirect("/whirlpool")
|
||||
|
|
|
@ -94,7 +94,7 @@ apt-get -y install pv sysstat network-manager rsync parted unzip pkg-config
|
|||
apt-get -y install libfreetype6-dev libpng-dev libatlas-base-dev libgmp-dev libltdl-dev
|
||||
apt-get -y install libffi-dev libssl-dev glances python3-bottle automake libtool libltdl7
|
||||
apt -y -qq install apt-transport-https ca-certificates
|
||||
apt-get -y install xorg chromium openbox lightdm
|
||||
apt-get -y install xorg chromium openbox lightdm openjdk-8-jre
|
||||
|
||||
|
||||
# Make sure some software is removed
|
||||
|
@ -317,6 +317,23 @@ if [ ! -f /usr/include/secp256k1_ecdh.h ]; then
|
|||
fi
|
||||
|
||||
|
||||
# Install Whirlpool
|
||||
WHIRLPOOL_UPGRADE_URL=https://github.com/Samourai-Wallet/whirlpool-client-cli/releases/download/0.9.3/whirlpool-client-cli-0.9.3-run.jar
|
||||
WHIRLPOOL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.whirlpool_url
|
||||
CURRENT=""
|
||||
if [ -f $WHIRLPOOL_UPGRADE_URL_FILE ]; then
|
||||
CURRENT=$(cat $WHIRLPOOL_UPGRADE_URL_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$WHIRLPOOL_UPGRADE_URL" ]; then
|
||||
sudo -u bitcoin mkdir -p /opt/mynode/whirlpool
|
||||
cd /opt/mynode/whirlpool
|
||||
sudo rm -rf *.jar
|
||||
sudo -u bitcoin wget -O whirlpool.jar $WHIRLPOOL_UPGRADE_URL
|
||||
|
||||
echo $WHIRLPOOL_UPGRADE_URL > $WHIRLPOOL_UPGRADE_URL_FILE
|
||||
fi
|
||||
|
||||
|
||||
# Install RTL
|
||||
RTL_UPGRADE_URL=https://github.com/Ride-The-Lightning/RTL/archive/v0.5.4.tar.gz
|
||||
RTL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.rtl_url
|
||||
|
|
Loading…
Reference in New Issue
Block a user