Add electrum server cert reset button

This commit is contained in:
Taylor Helsper 2020-02-18 23:37:06 -06:00
parent 04e3e867cb
commit 83f27496e3
2 changed files with 21 additions and 0 deletions

View File

@ -494,6 +494,19 @@ def regen_https_certs_page():
flash("HTTPS Service Restarted", category="message") flash("HTTPS Service Restarted", category="message")
return redirect(url_for(".page_settings")) return redirect(url_for(".page_settings"))
@mynode_settings.route("/settings/regen-electrs-certs")
def regen_electrs_certs_page():
check_logged_in()
# Touch files to trigger re-checking drive
os.system("rm -rf /home/bitcoin/.mynode/electrs")
os.system("rm -rf /mnt/hdd/mynode/settings/electrs")
os.system("sync")
os.system("systemctl restart tls_proxy")
flash("Electrum Server Service Restarted", category="message")
return redirect(url_for(".page_settings"))
@mynode_settings.route("/settings/reinstall-app") @mynode_settings.route("/settings/reinstall-app")
def reinstall_app_page(): def reinstall_app_page():
check_logged_in() check_logged_in()

View File

@ -796,6 +796,14 @@
Advanced: This will delete your Electrum Server data and reboot your device. Advanced: This will delete your Electrum Server data and reboot your device.
<br/> <br/>
<a href="/settings/reset-electrs" class="ui-button ui-widget ui-corner-all settings_button">Reset Data</a> <a href="/settings/reset-electrs" class="ui-button ui-widget ui-corner-all settings_button">Reset Data</a>
<div class="divider"></div>
<div class="settings_block_subheader">Reset Electrum Server Certificates</div>
This will regenerate your Electrum Server certificates.
<br/>
<a href="/settings/regen-electrs-certs" class="ui-button ui-widget ui-corner-all settings_button">Regenerate</a>
</div> </div>