mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-23 21:18:07 +00:00
Add electrum server reset; remove balanceofsatoshis
This commit is contained in:
parent
520ab17c3b
commit
b1e68c6a69
|
@ -26,7 +26,7 @@ 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 openjdk-11-jre libevent-dev
|
||||
apt-get -y install xorg chromium openbox lightdm openjdk-11-jre libevent-dev ncurses-dev
|
||||
|
||||
# Make sure some software is removed
|
||||
apt-get -y purge ntp # (conflicts with systemd-timedatectl)
|
||||
|
@ -39,6 +39,7 @@ pip install tzupdate virtualenv --no-cache-dir
|
|||
|
||||
# Install any pip3 software
|
||||
pip3 install python-bitcointx --no-cache-dir
|
||||
pip3 install gnureadline --no-cache-dir
|
||||
pip3 install lndmanage==0.9.0 --no-cache-dir # Install LND Manage (keep up to date with LND)
|
||||
pip3 install docker-compose --no-cache-dir
|
||||
|
||||
|
@ -71,7 +72,6 @@ usermod -aG docker root
|
|||
|
||||
|
||||
# Install node packages
|
||||
sudo -u admin npm install balanceofsatoshis
|
||||
|
||||
|
||||
# Upgrade BTC
|
||||
|
|
|
@ -398,6 +398,22 @@ def delete_lnd_data():
|
|||
return True
|
||||
|
||||
|
||||
#==================================
|
||||
# Electrum Server Functions
|
||||
#==================================
|
||||
def stop_electrs():
|
||||
os.system("systemctl stop electrs")
|
||||
|
||||
def delete_electrs_data():
|
||||
os.system("rm -rf /mnt/hdd/mynode/electrs")
|
||||
|
||||
def reset_electrs():
|
||||
stop_electrs()
|
||||
delete_electrs_data()
|
||||
reboot_device()
|
||||
|
||||
|
||||
|
||||
#==================================
|
||||
# Tor Functions
|
||||
#==================================
|
||||
|
|
|
@ -305,6 +305,21 @@ def rescan_blockchain_page():
|
|||
t.start()
|
||||
return redirect("/settings")
|
||||
|
||||
@mynode_settings.route("/settings/reset-electrs")
|
||||
def reset_electrs_page():
|
||||
check_logged_in()
|
||||
t = Timer(1.0, reset_electrs)
|
||||
t.start()
|
||||
|
||||
# Display wait page
|
||||
templateData = {
|
||||
"title": "myNode",
|
||||
"header_text": "Resetting Electrum Data",
|
||||
"subheader_text": "This will take several minutes...",
|
||||
"ui_settings": read_ui_settings()
|
||||
}
|
||||
return render_template('reboot.html', **templateData)
|
||||
|
||||
@mynode_settings.route("/settings/factory-reset", methods=['POST'])
|
||||
def factory_reset_page():
|
||||
check_logged_in()
|
||||
|
|
|
@ -748,6 +748,16 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="settings_block">
|
||||
<div class="settings_block_header">Electrum Server</div>
|
||||
|
||||
<div class="settings_block_subheader">Reset Electrum Server</div>
|
||||
Advanced: This will delete your Electrum Server data and reboot your device.
|
||||
<br/>
|
||||
<a href="/settings/reset-electrs" class="ui-button ui-widget ui-corner-all settings_button">Reset Data</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="settings_block">
|
||||
<div class="settings_block_header">Tor</div>
|
||||
|
||||
|
|
|
@ -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 openjdk-11-jre libevent-dev
|
||||
apt-get -y install xorg chromium openbox lightdm openjdk-11-jre libevent-dev ncurses-dev
|
||||
|
||||
|
||||
# Make sure some software is removed
|
||||
|
@ -148,6 +148,7 @@ fi
|
|||
pip3 install wheel setuptools
|
||||
pip3 install bitstring lnd-grpc pycoin aiohttp connectrum python-bitcoinlib
|
||||
pip3 install python-bitcointx
|
||||
pip3 install gnureadline
|
||||
pip3 install lndmanage==0.9.0 # Install LND Manage (keep up to date with LND)
|
||||
pip3 install docker-compose
|
||||
|
||||
|
@ -181,7 +182,6 @@ usermod -aG docker root
|
|||
|
||||
# Install node packages
|
||||
npm install -g pug-cli browserify uglify-js babel-cli
|
||||
sudo -u admin npm install balanceofsatoshis
|
||||
|
||||
# Remove existing MOTD login info
|
||||
rm -rf /etc/motd
|
||||
|
|
Loading…
Reference in New Issue
Block a user