mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 05:58:06 +00:00
Add warden basics
This commit is contained in:
parent
1355ae730f
commit
108e5bc39f
|
@ -20,7 +20,7 @@ Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
SyslogIdentifier=specter
|
SyslogIdentifier=ckbunker
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
26
rootfs/standard/etc/systemd/system/warden.service
Normal file
26
rootfs/standard/etc/systemd/system/warden.service
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# WARden service
|
||||||
|
# /etc/systemd/system/warden.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=WARden
|
||||||
|
Wants=bitcoind.service
|
||||||
|
After=bitcoind.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||||
|
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
|
||||||
|
WorkingDirectory=/opt/mynode/warden
|
||||||
|
ExecStart=/bin/bash -c 'source env/bin/activate && python3 warden --host 0.0.0.0 --port 5010'
|
||||||
|
|
||||||
|
User=bitcoin
|
||||||
|
Group=bitcoin
|
||||||
|
Type=simple
|
||||||
|
TimeoutSec=120
|
||||||
|
Restart=always
|
||||||
|
RestartSec=30
|
||||||
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
SyslogIdentifier=warden
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -820,6 +820,35 @@ if should_install_app "ckbunker" ; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Upgrade WARden
|
||||||
|
if should_install_app "warden" ; then
|
||||||
|
WARDEN_UPGRADE_URL=https://github.com/pxsocs/warden/archive/refs/tags/$WARDEN_VERSION.tar.gz
|
||||||
|
CURRENT=""
|
||||||
|
if [ -f $WARDEN_VERSION_FILE ]; then
|
||||||
|
CURRENT=$(cat $WARDEN_VERSION_FILE)
|
||||||
|
fi
|
||||||
|
if [ "$CURRENT" != "$WARDEN_VERSION" ]; then
|
||||||
|
cd /opt/mynode
|
||||||
|
rm -rf warden
|
||||||
|
|
||||||
|
sudo -u bitcoin wget $WARDEN_UPGRADE_URL -O warden.tar.gz
|
||||||
|
sudo -u bitcoin tar -xvf warden.tar.gz
|
||||||
|
sudo -u bitcoin rm warden.tar.gz
|
||||||
|
sudo -u bitcoin mv warden-* warden
|
||||||
|
cd warden
|
||||||
|
|
||||||
|
# Make venv
|
||||||
|
if [ ! -d env ]; then
|
||||||
|
sudo -u bitcoin python3 -m venv env
|
||||||
|
fi
|
||||||
|
source env/bin/activate
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
deactivate
|
||||||
|
|
||||||
|
echo $WARDEN_VERSION > $WARDEN_VERSION_FILE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Upgrade Sphinx Relay
|
# Upgrade Sphinx Relay
|
||||||
if should_install_app "sphinxrelay" ; then
|
if should_install_app "sphinxrelay" ; then
|
||||||
|
|
|
@ -105,6 +105,10 @@ SPHINXRELAY_VERSION="v2.0.13"
|
||||||
SPHINXRELAY_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version
|
SPHINXRELAY_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version
|
||||||
SPHINXRELAY_LATEST_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version_latest
|
SPHINXRELAY_LATEST_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version_latest
|
||||||
|
|
||||||
|
WARDEN_VERSION="0.91"
|
||||||
|
WARDEN_VERSION_FILE=/home/bitcoin/.mynode/warden_version
|
||||||
|
WARDEN_LATEST_VERSION_FILE=/home/bitcoin/.mynode/warden_version_latest
|
||||||
|
|
||||||
WEBSSH2_VERSION="v0.2.10-0"
|
WEBSSH2_VERSION="v0.2.10-0"
|
||||||
WEBSSH2_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version
|
WEBSSH2_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version
|
||||||
WEBSSH2_LATEST_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version_latest
|
WEBSSH2_LATEST_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version_latest
|
||||||
|
|
|
@ -378,6 +378,16 @@ def initialize_applications():
|
||||||
homepage_order=35,
|
homepage_order=35,
|
||||||
is_premium=True
|
is_premium=True
|
||||||
))
|
))
|
||||||
|
apps.append(create_application(
|
||||||
|
name="WARden",
|
||||||
|
short_name="warden",
|
||||||
|
requires_lightning=False,
|
||||||
|
app_tile_default_status_text="Bitcoin Portfolio",
|
||||||
|
can_uninstall=True,
|
||||||
|
show_on_homepage=True,
|
||||||
|
homepage_order=41,
|
||||||
|
is_premium=False
|
||||||
|
))
|
||||||
apps.append(create_application(
|
apps.append(create_application(
|
||||||
name="Web SSH",
|
name="Web SSH",
|
||||||
short_name="webssh2",
|
short_name="webssh2",
|
||||||
|
|
BIN
rootfs/standard/var/www/mynode/static/images/warden.png
Executable file
BIN
rootfs/standard/var/www/mynode/static/images/warden.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
Loading…
Reference in New Issue
Block a user