From 83f27496e36d8be8c9053c5011501b1621442857 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Tue, 18 Feb 2020 23:37:06 -0600 Subject: [PATCH] Add electrum server cert reset button --- rootfs/standard/var/www/mynode/settings.py | 13 +++++++++++++ .../standard/var/www/mynode/templates/settings.html | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/rootfs/standard/var/www/mynode/settings.py b/rootfs/standard/var/www/mynode/settings.py index 7968b237..d7a0d371 100644 --- a/rootfs/standard/var/www/mynode/settings.py +++ b/rootfs/standard/var/www/mynode/settings.py @@ -494,6 +494,19 @@ def regen_https_certs_page(): flash("HTTPS Service Restarted", category="message") 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") def reinstall_app_page(): check_logged_in() diff --git a/rootfs/standard/var/www/mynode/templates/settings.html b/rootfs/standard/var/www/mynode/templates/settings.html index f2a06755..04f9d099 100644 --- a/rootfs/standard/var/www/mynode/templates/settings.html +++ b/rootfs/standard/var/www/mynode/templates/settings.html @@ -796,6 +796,14 @@ Advanced: This will delete your Electrum Server data and reboot your device.
Reset Data + +
+ +
Reset Electrum Server Certificates
+ This will regenerate your Electrum Server certificates. +
+ Regenerate +