mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 14:08:07 +00:00
Add button to regen LND TLS cert
This commit is contained in:
parent
34a84650e7
commit
d81210e70a
|
@ -25,7 +25,7 @@ while true; do
|
|||
/usr/bin/expect /usr/bin/unlock_lnd.tcl
|
||||
if [ $? -eq 0 ]; then
|
||||
# Unlocked! Verify unlocked every time LND files change
|
||||
inotifywait -r -e modify -e create -e delete /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/
|
||||
inotifywait -r -e modify -e create -e delete /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/ /mnt/hdd/mynode/lnd/tls.cert
|
||||
else
|
||||
# Failed, try again in 15 seconds
|
||||
/bin/sleep 15s
|
||||
|
|
|
@ -156,6 +156,9 @@ def stop_bitcoind():
|
|||
def stop_lnd():
|
||||
os.system("systemctl stop lnd")
|
||||
|
||||
def restart_lnd():
|
||||
os.system("systemctl restart lnd")
|
||||
|
||||
def stop_quicksync():
|
||||
os.system("systemctl stop quicksync")
|
||||
|
||||
|
|
|
@ -124,6 +124,19 @@ def page_lnd():
|
|||
}
|
||||
return render_template('lnd.html', **templateData)
|
||||
|
||||
@mynode_lnd.route("/lnd/regen_tls_cert")
|
||||
def lnd_regen_tls_cert():
|
||||
check_logged_in()
|
||||
|
||||
os.system("rm /mnt/hdd/mynode/lnd/tls.cert")
|
||||
os.system("rm /mnt/hdd/mynode/lnd/tls.key")
|
||||
|
||||
t = Timer(1.0, restart_lnd)
|
||||
t.start()
|
||||
|
||||
flash("TLS Certificate Regenerated!", category="message")
|
||||
return redirect(url_for(".page_lnd"))
|
||||
|
||||
@mynode_lnd.route("/lnd/tls.cert")
|
||||
def lnd_tls_cert():
|
||||
check_logged_in()
|
||||
|
|
|
@ -127,9 +127,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">TLS Certificate</div>
|
||||
<div class="info_tile_header"> TLS Certificate </div>
|
||||
<div class="info_tile_contents">
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 70%;" href="/lnd/tls.cert">download</a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 32%;" href="/lnd/tls.cert">download</a>
|
||||
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 32%;" href="/lnd/regen_tls_cert">regenerate</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info_tile">
|
||||
|
|
Loading…
Reference in New Issue
Block a user