mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-26 14:34:00 +00:00
Add HTTPS cert regen
This commit is contained in:
parent
adf74f3dd7
commit
a81da403e1
|
@ -13,7 +13,7 @@ KillMode=process
|
|||
TimeoutSec=30
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
ExecStartPre=/usr/bin/mynode_gen_cert.sh https
|
||||
ExecStartPre=/usr/bin/mynode_gen_cert.sh https 825
|
||||
ExecStart=/usr/sbin/hitch -u bitcoin -g bitcoin --tls --backend=[127.0.0.1]:80 --frontend=[0.0.0.0]:443 /home/bitcoin/.mynode/https/myNode.local.pem
|
||||
User=root
|
||||
Group=root
|
||||
|
|
|
@ -12,6 +12,10 @@ if [ ! -z "$1" ]; then
|
|||
OUTPUT_DIR="${OUTPUT_DIR_BASE}/$1"
|
||||
HDD_DIR="${HDD_DIR_BASE}/$1"
|
||||
fi
|
||||
DAYS=99999
|
||||
if [ ! -z "$1" ]; then
|
||||
DAYS=$2
|
||||
fi
|
||||
|
||||
mkdir -p $OUTPUT_DIR
|
||||
mkdir -p $HDD_DIR
|
||||
|
@ -54,7 +58,7 @@ openssl req -new -key $OUTPUT_DIR/$domain.key -out $OUTPUT_DIR/$domain.csr -pass
|
|||
|
||||
# Create Certificate
|
||||
echo "Creating Certificate"
|
||||
openssl x509 -req -days 99999 -in $OUTPUT_DIR/$domain.csr -signkey $OUTPUT_DIR/$domain.key -out $OUTPUT_DIR/$domain.crt
|
||||
openssl x509 -req -days $DAYS -in $OUTPUT_DIR/$domain.csr -signkey $OUTPUT_DIR/$domain.key -out $OUTPUT_DIR/$domain.crt
|
||||
|
||||
echo "Creating PEM"
|
||||
cat $OUTPUT_DIR/$domain.key > $OUTPUT_DIR/$domain.pem
|
||||
|
|
|
@ -375,6 +375,17 @@ def repair_drive_page():
|
|||
}
|
||||
return render_template('reboot.html', **templateData)
|
||||
|
||||
@mynode_settings.route("/settings/regen-https-certs")
|
||||
def regen_https_certs_page():
|
||||
# Touch files to trigger re-checking drive
|
||||
os.system("rm -rf /home/bitcoin/.mynode/https")
|
||||
os.system("rm -rf /mnt/hdd/mynode/settings/https")
|
||||
os.system("sync")
|
||||
os.system("systemctl restart https")
|
||||
|
||||
flash("HTTPS Service Restarted", category="message")
|
||||
return redirect(url_for(".page_settings"))
|
||||
|
||||
@mynode_settings.route("/settings/toggle-uploader")
|
||||
def toggle_uploader_page():
|
||||
# Toggle uploader
|
||||
|
|
|
@ -402,6 +402,13 @@
|
|||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="settings_block_subheader">Reset HTTP Certificates</div>
|
||||
This will regenerate yur HTTPS certificates.
|
||||
<br/>
|
||||
<a href="/settings/regen-https-certs" class="ui-button ui-widget ui-corner-all settings_button">Regenerate</a>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="settings_block_subheader">Re-scan Blockchain</div>
|
||||
Advanced: If you are having issues parsing the Bitcoin blockchain or blocks cannot be found, please try rescanning.
|
||||
<br/>
|
||||
|
|
Loading…
Reference in New Issue
Block a user