mirror of
https://github.com/mynodebtc/mynode.git
synced 2025-01-11 11:29:27 +00:00
Merge branch 'master' of github.com:mynodebtc/mynode
This commit is contained in:
commit
f8814630d7
|
@ -576,12 +576,6 @@ if should_install_app "joininbox" ; then
|
|||
chmod -R +x ./joininbox/
|
||||
sudo -u joinmarket cp -rf ./joininbox/scripts/* .
|
||||
|
||||
# Apply patches
|
||||
echo "" > set.password.sh
|
||||
echo "" > standalone/expand.rootfs.sh
|
||||
sudo -u joinmarket cp /usr/share/joininbox/menu.update.sh /home/joinmarket/menu.update.sh
|
||||
sudo -u joinmarket sed -i "s|/home/joinmarket/menu.config.sh|echo 'mynode skip config'|g" /home/joinmarket/start.joininbox.sh
|
||||
|
||||
# Install
|
||||
sudo -u joinmarket bash -c "cd /home/joinmarket/; ./install.joinmarket.sh install" || true
|
||||
|
||||
|
@ -906,6 +900,20 @@ if should_install_app "warden" ; then
|
|||
fi
|
||||
|
||||
|
||||
# Upgrade Balance of Satoshis
|
||||
if should_install_app "bos" ; then
|
||||
CURRENT=""
|
||||
if [ -f $BOS_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $BOS_VERSION_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$BOS_VERSION" ]; then
|
||||
npm install -g balanceofsatoshis@$BOS_VERSION
|
||||
|
||||
echo $BOS_VERSION > $BOS_VERSION_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,9 @@ else
|
|||
fi
|
||||
|
||||
# Custom re-install steps
|
||||
if [ "$APP" = "netdata" ]; then
|
||||
if [ "$APP" = "bos" ]; then
|
||||
npm uninstall -g balanceofsatoshis
|
||||
elif [ "$APP" = "netdata" ]; then
|
||||
systemctl stop netdata
|
||||
docker rmi netdata/netdata || true
|
||||
elif [ "$APP" = "btcpayserver" ]; then
|
||||
|
@ -46,6 +48,7 @@ elif [ "$APP" = "webssh2" ]; then
|
|||
docker rmi webssh2
|
||||
elif [ "$APP" = "dojo" ]; then
|
||||
rm -f /mnt/hdd/mynode/settings/dojo_url
|
||||
rm -f /mnt/hdd/mynode/settings/mynode_dojo_install
|
||||
cd /mnt/hdd/mynode/dojo/docker/my-dojo/
|
||||
|
||||
# Stop and uninstall
|
||||
|
|
|
@ -118,17 +118,19 @@ fi
|
|||
# Check drive (only if exactly 1 is found)
|
||||
set +e
|
||||
if [ $IS_X86 = 0 ]; then
|
||||
touch /tmp/repairing_drive
|
||||
for d in /dev/sd*1 /dev/hd*1 /dev/vd*1 /dev/nvme*p1; do
|
||||
echo "Repairing drive $d ...";
|
||||
fsck -y $d > /tmp/fsck_results 2>&1
|
||||
RC=$?
|
||||
echo "" >> /tmp/fsck_results
|
||||
echo "Code: $RC" >> /tmp/fsck_results
|
||||
if [ "$RC" -ne 0 ] && [ "$RC" -ne 8 ] ; then
|
||||
touch /tmp/fsck_error
|
||||
fi
|
||||
done
|
||||
if [ ! -f /home/bitcoin/.mynode/skip_fsck ]; then
|
||||
touch /tmp/repairing_drive
|
||||
for d in /dev/sd*1 /dev/hd*1 /dev/vd*1 /dev/nvme*p1; do
|
||||
echo "Repairing drive $d ...";
|
||||
fsck -y $d > /tmp/fsck_results 2>&1
|
||||
RC=$?
|
||||
echo "" >> /tmp/fsck_results
|
||||
echo "Code: $RC" >> /tmp/fsck_results
|
||||
if [ "$RC" -ne 0 ] && [ "$RC" -ne 8 ] ; then
|
||||
touch /tmp/fsck_error
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/repairing_drive
|
||||
set -e
|
||||
|
@ -792,6 +794,7 @@ echo $SPECTER_VERSION > $SPECTER_LATEST_VERSION_FILE
|
|||
echo $THUNDERHUB_VERSION > $THUNDERHUB_LATEST_VERSION_FILE
|
||||
echo $LNDCONNECT_VERSION > $LNDCONNECT_LATEST_VERSION_FILE
|
||||
echo $CKBUNKER_VERSION > $CKBUNKER_LATEST_VERSION_FILE
|
||||
echo $BOS_VERSION > $BOS_LATEST_VERSION_FILE
|
||||
echo $SPHINXRELAY_VERSION > $SPHINXRELAY_LATEST_VERSION_FILE
|
||||
echo $WEBSSH2_VERSION > $WEBSSH2_LATEST_VERSION_FILE
|
||||
echo $PYBLOCK_VERSION > $PYBLOCK_LATEST_VERSION_FILE
|
||||
|
|
|
@ -25,12 +25,26 @@ sync
|
|||
rm -rf /opt/mynode/${APP}
|
||||
|
||||
# Custom uninstall steps
|
||||
if [ "$APP" = "btcrpcexplorer" ]; then
|
||||
if [ "$APP" = "bos" ]; then
|
||||
npm uninstall -g balanceofsatoshis
|
||||
elif [ "$APP" = "btcrpcexplorer" ]; then
|
||||
rm -rf /opt/mynode/btc-rpc-explorer
|
||||
elif [ "$APP" = "dojo" ]; then
|
||||
rm -f /mnt/hdd/mynode/settings/dojo_url
|
||||
rm -f /mnt/hdd/mynode/settings/mynode_dojo_install
|
||||
cd /mnt/hdd/mynode/dojo/docker/my-dojo/
|
||||
|
||||
# Stop and uninstall
|
||||
yes | ./dojo.sh uninstall
|
||||
|
||||
# Reset config files
|
||||
cd ~
|
||||
rm -rf /opt/download/dojo
|
||||
rm -rf /mnt/hdd/mynode/dojo
|
||||
elif [ "$APP" = "lndhub" ]; then
|
||||
rm -rf /opt/mynode/LndHub
|
||||
elif [ "$APP" = "rtl" ]; then
|
||||
m -rf /opt/mynode/RTL
|
||||
rm -rf /opt/mynode/RTL
|
||||
else
|
||||
echo "No custom uninstall steps"
|
||||
fi
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /home/joinmarket/_functions.sh
|
||||
|
||||
# BASIC MENU INFO
|
||||
HEIGHT=12
|
||||
WIDTH=56
|
||||
CHOICE_HEIGHT=1
|
||||
TITLE="Update options"
|
||||
MENU="Updates managed by myNode"
|
||||
OPTIONS=()
|
||||
BACKTITLE="JoininBox GUI"
|
||||
|
||||
# Basic Options
|
||||
OPTIONS+=(\
|
||||
RETURN "Back to main menu" \
|
||||
)
|
||||
|
||||
CHOICE=$(dialog --clear \
|
||||
--backtitle "$BACKTITLE" \
|
||||
--title "$TITLE" \
|
||||
--menu "$MENU" \
|
||||
$HEIGHT $WIDTH $CHOICE_HEIGHT \
|
||||
"${OPTIONS[@]}" \
|
||||
2>&1 >/dev/tty)
|
||||
|
||||
case $CHOICE in
|
||||
RETURN)
|
||||
echo ""
|
||||
;;
|
||||
esac
|
|
@ -53,7 +53,7 @@ JOINMARKET_VERSION="v0.8.2"
|
|||
JOINMARKET_VERSION_FILE=/home/bitcoin/.mynode/joinmarket_version
|
||||
JOINMARKET_LATEST_VERSION_FILE=/home/bitcoin/.mynode/joinmarket_version_latest
|
||||
|
||||
JOININBOX_VERSION="v0.3.0"
|
||||
JOININBOX_VERSION="v0.4.0"
|
||||
JOININBOX_VERSION_FILE=/home/bitcoin/.mynode/joininbox_version
|
||||
JOININBOX_LATEST_VERSION_FILE=/home/bitcoin/.mynode/joininbox_version_latest
|
||||
|
||||
|
@ -89,7 +89,7 @@ SPECTER_VERSION="1.3.1"
|
|||
SPECTER_VERSION_FILE=/home/bitcoin/.mynode/specter_version
|
||||
SPECTER_LATEST_VERSION_FILE=/home/bitcoin/.mynode/specter_version_latest
|
||||
|
||||
THUNDERHUB_VERSION="v0.12.12"
|
||||
THUNDERHUB_VERSION="v0.12.17"
|
||||
THUNDERHUB_VERSION_FILE=/home/bitcoin/.mynode/thunderhub_version
|
||||
THUNDERHUB_LATEST_VERSION_FILE=/home/bitcoin/.mynode/thunderhub_version_latest
|
||||
|
||||
|
@ -101,7 +101,11 @@ CKBUNKER_VERSION="v0.9"
|
|||
CKBUNKER_VERSION_FILE=/home/bitcoin/.mynode/ckbunker_version
|
||||
CKBUNKER_LATEST_VERSION_FILE=/home/bitcoin/.mynode/ckbunker_version_latest
|
||||
|
||||
SPHINXRELAY_VERSION="v2.0.13"
|
||||
BOS_VERSION="8.0.14"
|
||||
BOS_VERSION_FILE=/home/bitcoin/.mynode/bos_version
|
||||
BOS_LATEST_VERSION_FILE=/home/bitcoin/.mynode/bos_version_latest
|
||||
|
||||
SPHINXRELAY_VERSION="v2.0.14"
|
||||
SPHINXRELAY_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version
|
||||
SPHINXRELAY_LATEST_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version_latest
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ def uninstall_app(app):
|
|||
os.system("sync")
|
||||
|
||||
def is_installed(short_name):
|
||||
filename1 = "/home/bitcoin/.mynode/"+short_name+"_install"
|
||||
filename2 = "/mnt/hdd/mynode/settings/"+short_name+"_install"
|
||||
filename1 = "/home/bitcoin/.mynode/install_"+short_name
|
||||
filename2 = "/mnt/hdd/mynode/settings/install_"+short_name
|
||||
if os.path.isfile(filename1):
|
||||
return True
|
||||
elif os.path.isfile(filename2):
|
||||
|
@ -131,7 +131,7 @@ def create_application(name="NAME",
|
|||
app["current_version"] = get_app_current_version(short_name)
|
||||
app["latest_version"] = get_app_latest_version(short_name)
|
||||
app["is_beta"] = is_beta
|
||||
app["is_installed"] = is_installed(app["current_version"])
|
||||
app["is_installed"] = is_installed(short_name)
|
||||
app["can_reinstall"] = can_reinstall
|
||||
app["can_uninstall"] = can_uninstall
|
||||
app["requires_lightning"] = requires_lightning
|
||||
|
@ -407,6 +407,16 @@ def initialize_applications():
|
|||
# homepage_order=42,
|
||||
# is_premium=False
|
||||
# ))
|
||||
apps.append(create_application(
|
||||
name="Balance of Satoshis",
|
||||
short_name="bos",
|
||||
requires_lightning=True,
|
||||
app_tile_default_status_text="Lightning Tool",
|
||||
can_uninstall=True,
|
||||
can_enable_disable=False,
|
||||
show_on_homepage=False,
|
||||
is_premium=False
|
||||
))
|
||||
apps.append(create_application(
|
||||
name="Web SSH",
|
||||
short_name="webssh2",
|
||||
|
@ -575,6 +585,8 @@ def get_application_status(short_name):
|
|||
def get_application_status_color_special(short_name):
|
||||
if short_name == "lnd":
|
||||
return get_lnd_status_color()
|
||||
elif short_name == "bos":
|
||||
return "clear"
|
||||
elif short_name == "joininbox":
|
||||
return "clear"
|
||||
elif short_name == "pyblock":
|
||||
|
|
|
@ -677,6 +677,15 @@ def get_fsck_results():
|
|||
return "ERROR"
|
||||
return "ERROR"
|
||||
|
||||
def set_skip_fsck(skip):
|
||||
if skip:
|
||||
os.system("touch /home/bitcoin/.mynode/skip_fsck")
|
||||
else:
|
||||
os.system("rm -f /home/bitcoin/.mynode/skip_fsck")
|
||||
os.system("sync")
|
||||
def skip_fsck():
|
||||
return os.path.isfile("/home/bitcoin/.mynode/skip_fsck")
|
||||
|
||||
def has_sd_rw_error():
|
||||
return os.path.isfile("/tmp/sd_rw_error")
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ def page_settings():
|
|||
"upload_rate": upload_rate,
|
||||
"is_btc_lnd_tor_enabled": is_btc_lnd_tor_enabled(),
|
||||
"is_aptget_tor_enabled": is_aptget_tor_enabled(),
|
||||
"skip_fsck": skip_fsck(),
|
||||
"uptime": uptime,
|
||||
"date": date,
|
||||
"local_ip": local_ip,
|
||||
|
@ -945,6 +946,17 @@ def toggle_netdata_page():
|
|||
enable_service("netdata")
|
||||
return redirect("/settings")
|
||||
|
||||
@mynode_settings.route("/settings/toggle-check-external-drive")
|
||||
def toggle_check_external_drive_page():
|
||||
check_logged_in()
|
||||
|
||||
if skip_fsck():
|
||||
set_skip_fsck(False)
|
||||
else:
|
||||
set_skip_fsck(True)
|
||||
flash("Check External Drive Updated", category="message")
|
||||
return redirect("/settings")
|
||||
|
||||
@mynode_settings.route("/settings/modify-swap")
|
||||
def modify_swap_page():
|
||||
check_logged_in()
|
||||
|
|
BIN
rootfs/standard/var/www/mynode/static/images/apps.png
Normal file
BIN
rootfs/standard/var/www/mynode/static/images/apps.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
rootfs/standard/var/www/mynode/static/images/bos.png
Normal file
BIN
rootfs/standard/var/www/mynode/static/images/bos.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
BIN
rootfs/standard/var/www/mynode/static/images/marketplace.png
Normal file
BIN
rootfs/standard/var/www/mynode/static/images/marketplace.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
|
@ -37,6 +37,17 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- App Store Icon -->
|
||||
<div class="app_tile">
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/")}}apps.png"/></div>
|
||||
|
||||
<div class="app_title">Applications</div>
|
||||
<div class="app_status" id="marketplace_status">Manage Apps</div>
|
||||
<div class="app_contents">
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/apps">Manage</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -942,6 +942,14 @@
|
|||
<br/>
|
||||
<a href="/settings/remount-external-drive" class="ui-button ui-widget ui-corner-all settings_button">Remount Drive</a>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="settings_block_subheader">Check External Drive</div>
|
||||
The external drive will be checked for errors automatically on each boot. This can be disabled, but is not recommended.
|
||||
<br/>
|
||||
<a href="/settings/toggle-check-external-drive" class="ui-button ui-widget ui-corner-all settings_button">{% if skip_fsck %}Enable{% else %}Disable{% endif %}</a>
|
||||
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="settings_block_subheader">Format External Drive</div>
|
||||
|
|
|
@ -18,6 +18,7 @@ apps = [{"name": "bitcoin/bitcoin", "current_version_var
|
|||
{"name": "unchained-capital/caravan", "current_version_variable": "CARAVAN_VERSION"},
|
||||
{"name": "cryptoadvance/specter-desktop", "current_version_variable": "SPECTER_VERSION"},
|
||||
{"name": "Coldcard/ckbunker", "current_version_variable": "CKBUNKER_VERSION"},
|
||||
{"name": "alexbosworth/balanceofsatoshis", "current_version_variable": "BOS_VERSION"},
|
||||
{"name": "lnbits/lnbits", "current_version": "6cf4881"},
|
||||
{"name": "apotdevin/thunderhub", "current_version_variable": "THUNDERHUB_VERSION"},
|
||||
{"name": "stakwork/sphinx-relay", "current_version_variable": "SPHINXRELAY_VERSION"},
|
||||
|
|
|
@ -625,12 +625,6 @@ if [ $IS_RASPI = 1 ] || [ $IS_X86 = 1 ]; then
|
|||
chmod -R +x ./joininbox/
|
||||
sudo -u joinmarket cp -rf ./joininbox/scripts/* .
|
||||
|
||||
# Apply patches
|
||||
echo "" > set.password.sh
|
||||
echo "" > standalone/expand.rootfs.sh
|
||||
sudo -u joinmarket cp $TMP_INSTALL_PATH/usr/share/joininbox/menu.update.sh /home/joinmarket/menu.update.sh # fails in setup since files are extracted yet
|
||||
sudo -u joinmarket sed -i "s|/home/joinmarket/menu.config.sh|echo 'mynode skip config'|g" /home/joinmarket/start.joininbox.sh
|
||||
|
||||
echo $JOININBOX_VERSION > $JOININBOX_VERSION_FILE
|
||||
fi
|
||||
fi
|
||||
|
@ -868,6 +862,7 @@ if [ "$CURRENT" != "$SPHINXRELAY_VERSION" ]; then
|
|||
fi
|
||||
|
||||
|
||||
# SKIPPING BOS - OPTIONAL APP
|
||||
# SKIPPING PYBLOCK - OPTIONAL APP
|
||||
# SKIPPING WARDEN - OPTIONAL APP
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user