mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-11 16:09:16 +00:00
Add LndBoss v2.16.0
This commit is contained in:
parent
5fee4d48d9
commit
92ccb631ed
63
rootfs/standard/usr/share/mynode_apps/lndboss/lndboss.json
Normal file
63
rootfs/standard/usr/share/mynode_apps/lndboss/lndboss.json
Normal file
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"name": "LndBoss",
|
||||
"short_name": "lndboss",
|
||||
"author": {
|
||||
"name": "niteshbalusu11",
|
||||
"link": "https://github.com/niteshbalusu11"
|
||||
},
|
||||
"website": {
|
||||
"name": "GitHub",
|
||||
"link": "https://github.com/niteshbalusu11/lndboss"
|
||||
},
|
||||
"category": "lightning_app",
|
||||
"short_description": "Lightning Utility",
|
||||
"description": [
|
||||
"A GUI For BalanceOfSatoshis."
|
||||
],
|
||||
"latest_version": "v2.16.0",
|
||||
"supported_archs": null,
|
||||
"download_skip": false,
|
||||
"download_type": "source",
|
||||
"download_source_url": "https://github.com/niteshbalusu11/lndboss/archive/refs/tags/{VERSION}.tar.gz",
|
||||
"download_binary_url": {
|
||||
"aarch64": "download_url",
|
||||
"x86_64": "download_url"
|
||||
},
|
||||
"install_env_vars": {},
|
||||
"supports_app_page": true,
|
||||
"supports_testnet": false,
|
||||
"http_port": 8055,
|
||||
"https_port": 8056,
|
||||
"requires_bitcoin": true,
|
||||
"requires_docker_image_installation": true,
|
||||
"requires_electrs": false,
|
||||
"requires_lightning": true,
|
||||
"show_on_application_page": true,
|
||||
"show_on_homepage": true,
|
||||
"show_on_status_page": true,
|
||||
"hide_status_icon": false,
|
||||
"app_tile_name": "LndBoss",
|
||||
"app_tile_running_status_text": "Running",
|
||||
"app_tile_button_text": "Info",
|
||||
"app_tile_button_href": "/app/lndboss/info",
|
||||
"app_page_show_open_button": true,
|
||||
"app_page_content": [
|
||||
{
|
||||
"heading": "Instructions",
|
||||
"content": [
|
||||
"A GUI For BalanceOfSatoshis. You can open the app with the Open button on the left.",
|
||||
"The username is 'admin' and the password is the same as your myNode password.",
|
||||
"Enjoy!"
|
||||
]
|
||||
}
|
||||
],
|
||||
"can_uninstall": true,
|
||||
"can_reinstall": true,
|
||||
"can_enable_disable": true,
|
||||
"is_beta": false,
|
||||
"is_premium": false,
|
||||
"homepage_section": "apps",
|
||||
"homepage_order": 91,
|
||||
"app_type": "custom",
|
||||
"sdk_version": 2
|
||||
}
|
BIN
rootfs/standard/usr/share/mynode_apps/lndboss/lndboss.png
Normal file
BIN
rootfs/standard/usr/share/mynode_apps/lndboss/lndboss.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
|
@ -0,0 +1,40 @@
|
|||
# lndboss service
|
||||
# /etc/systemd/system/lndboss.service
|
||||
|
||||
[Unit]
|
||||
Description=lndboss
|
||||
Wants=www.service docker_images.service
|
||||
After=www.service docker_images.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/mynode/lndboss
|
||||
|
||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=+/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_lndboss.sh ]; then /bin/bash /usr/bin/service_scripts/pre_lndboss.sh; fi'
|
||||
ExecStart=/usr/bin/docker run --rm \
|
||||
--name lndboss \
|
||||
--publish 8055:8055 \
|
||||
--env BOS_DATA_PATH="/root/.bosgui" \
|
||||
--env LNDBOSS_DIRECTORY="/root/.bosgui" \
|
||||
--env NODE_ENV="production" \
|
||||
--env PORT="8055" \
|
||||
--env BOS_DEFAULT_LND_SOCKET="host.docker.internal:10009" \
|
||||
--volume /mnt/hdd/mynode/lndboss/:/root/.bosgui \
|
||||
--volume /mnt/hdd/mynode/lnd/:/root/.lnd \
|
||||
--add-host=host.docker.internal:host-gateway \
|
||||
lndboss
|
||||
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_lndboss.sh ]; then /bin/bash /usr/bin/service_scripts/post_lndboss.sh; fi'
|
||||
ExecStop=/usr/bin/docker stop -t 2 lndboss
|
||||
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
TimeoutSec=120
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=lndboss
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
|||
server {
|
||||
listen 8056 ssl;
|
||||
server_name lndboss;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_params.conf;
|
||||
include /etc/nginx/mynode/mynode_ssl_cert_key.conf;
|
||||
|
||||
access_log /var/log/nginx/access_lndboss.log;
|
||||
error_log /var/log/nginx/error_lndboss.log;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8055;
|
||||
|
||||
include /etc/nginx/mynode/mynode_ssl_proxy_params.conf;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/share/mynode/mynode_device_info.sh
|
||||
source /usr/share/mynode/mynode_app_versions.sh
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
echo "==================== INSTALLING APP ===================="
|
||||
|
||||
# The current directory is the app install folder and the app tarball from GitHub
|
||||
# has already been downloaded and extracted. Any additional env variables specified
|
||||
# in the JSON file are also present.
|
||||
|
||||
# Remove old containers
|
||||
docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep 'lndboss') || true
|
||||
|
||||
# Build docker container
|
||||
if [ "$DEVICE_ARCH" = "x86_64" ]; then
|
||||
docker build -t lndboss .
|
||||
elif [ "$DEVICE_ARCH" = "aarch64" ]; then
|
||||
docker build . -t lndboss -f arm64.Dockerfile
|
||||
else
|
||||
echo "THIS ARCHITECTURE IS NOT SUPPORTED FOR LndBoss"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "================== DONE INSTALLING APP ================="
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This will run after launching the application
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This will run prior to launching the application
|
||||
|
||||
echo "" > /mnt/hdd/mynode/lndboss/auth.json
|
||||
if [ -f /home/bitcoin/.mynode/.hashedpw_bcrypt ]; then
|
||||
HASH_BCRYPT=$(cat /home/bitcoin/.mynode/.hashedpw_bcrypt)
|
||||
cat << EOF > /mnt/hdd/mynode/lndboss/auth.json
|
||||
{
|
||||
"username": "admin",
|
||||
"passwordHash": "$HASH_BCRYPT"
|
||||
}
|
||||
EOF
|
||||
fi
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/share/mynode/mynode_device_info.sh
|
||||
source /usr/share/mynode/mynode_app_versions.sh
|
||||
|
||||
echo "==================== UNINSTALLING APP ===================="
|
||||
|
||||
# The app folder will be removed automatically after this script runs. You may not need to do anything here.
|
||||
|
||||
# Remove old containers
|
||||
docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep 'lndboss') || true
|
||||
|
||||
echo "================== DONE UNINSTALLING APP ================="
|
|
@ -0,0 +1,32 @@
|
|||
from flask import Blueprint, render_template, redirect
|
||||
from user_management import check_logged_in
|
||||
from enable_disable_functions import *
|
||||
from device_info import *
|
||||
from application_info import *
|
||||
from systemctl_info import *
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
|
||||
mynode_lndboss = Blueprint('mynode_lndboss',__name__)
|
||||
|
||||
|
||||
### Page functions (have prefix /app/<app name/)
|
||||
@mynode_lndboss.route("/info")
|
||||
def lndboss_page():
|
||||
check_logged_in()
|
||||
|
||||
app = get_application("lndboss")
|
||||
app_status = get_application_status("lndboss")
|
||||
app_status_color = get_application_status_color("lndboss")
|
||||
|
||||
# Load page
|
||||
templateData = {
|
||||
"title": "myNode - " + app["name"],
|
||||
"ui_settings": read_ui_settings(),
|
||||
"app_status": app_status,
|
||||
"app_status_color": app_status_color,
|
||||
"app": app
|
||||
}
|
||||
return render_template('/app/generic_app.html', **templateData)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Custom Jinja templates (HTML files) can be added here for unique application pages
|
||||
|
||||
Templates will be available under applications/<short_name>/xyz.html
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html lang="en">
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
{% include 'includes/head.html' %}
|
||||
</head>
|
||||
<body>
|
||||
{% include 'includes/logo_header.html' %}
|
||||
<div class="mynode_top_left_div">
|
||||
<a href="/"><img class="mynode_nav_icon" src="{{ url_for('static', filename="images/home.png")}}"/></a>
|
||||
</div>
|
||||
|
||||
<div class="main_header">{{app.name}} (custom page - remove)</div>
|
||||
<br/>
|
||||
|
||||
<div class="app_tile_row">
|
||||
<div class="info_tile">
|
||||
<div class="info_tile_header">Status</div>
|
||||
<div class="info_tile_contents">
|
||||
<table class="info_table">
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<td>{{app_status}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Actions</th>
|
||||
<td>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Open</a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Button A</a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;" href="#">Button B</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="instructions">
|
||||
<div class="instructions-header">Instructions</div>
|
||||
<ol class="instructions-steps">
|
||||
<li>Custom instructions?</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div id="confirm-dialog"></div>
|
||||
|
||||
<div id="loading_spinner_overlay" class="loading_spinner_overlay" style="display:none;">
|
||||
<img id="loading_spinner" class="loading_image" src="{{ url_for('static', filename="images/loading.gif")}}"/>
|
||||
<br/>
|
||||
<span id="loading_spinner_message">Loading...</span>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user