mirror of
https://github.com/mynodebtc/mynode.git
synced 2025-01-11 11:29:27 +00:00
Add Lightning Terminal v0.4.1 (#500)
This commit is contained in:
parent
31f591adbe
commit
59031dc6e1
|
@ -20,6 +20,11 @@ have support or patial support.
|
|||
- Specter
|
||||
- Bitcoin RPC Explorer
|
||||
|
||||
## Lightning Terminal
|
||||
|
||||
- The Lightning Terminal password is randomized when it is installed. You can view it via the Lightning page.
|
||||
- The password may be updated to your myNode password in future version.
|
||||
|
||||
## Thunderhub
|
||||
|
||||
- When Thunderhub is first installed, logging in will be disabled. You must either change your password or log out and log back in of the the myNode UI before using Thunderhub. At that point, Thunderhub will use the same password as myNode.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/var/log/flask
|
||||
/var/log/lndhub.log
|
||||
/var/log/lnd.log
|
||||
/var/log/loopd.log
|
||||
/var/log/litd.log
|
||||
/var/log/lnd_backup.log
|
||||
/var/log/lnd_admin.log
|
||||
/var/log/mynode.log
|
||||
|
|
2
rootfs/standard/etc/rsyslog.d/litd.conf
Normal file
2
rootfs/standard/etc/rsyslog.d/litd.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
if $programname == 'litd' then /var/log/litd.log
|
||||
& stop
|
30
rootfs/standard/etc/systemd/system/litd.service
Normal file
30
rootfs/standard/etc/systemd/system/litd.service
Normal file
|
@ -0,0 +1,30 @@
|
|||
# litd service
|
||||
# /etc/systemd/system/litd.service
|
||||
|
||||
[Unit]
|
||||
Description=Lightning Terminal
|
||||
Wants=bitcoind.service lnd.service
|
||||
After=bitcoind.service lnd.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
|
||||
ExecStart=/usr/local/bin/litd --lit-dir=/mnt/hdd/mynode/lit
|
||||
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=process
|
||||
LimitNOFILE=128000
|
||||
TimeoutSec=240
|
||||
Nice=-1
|
||||
IOAccounting=true
|
||||
IOWeight=400
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=litd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -232,6 +232,7 @@ HiddenServicePort 4080 127.0.0.1:4080
|
|||
HiddenServicePort 4081 127.0.0.1:4081
|
||||
HiddenServicePort 5000 127.0.0.1:5000
|
||||
HiddenServicePort 5001 127.0.0.1:5001
|
||||
HiddenServicePort 8443 127.0.0.1:8443
|
||||
HiddenServicePort 8899 127.0.0.1:8899
|
||||
HiddenServicePort 19999 127.0.0.1:19999
|
||||
HiddenServicePort 20000 127.0.0.1:20000
|
||||
|
|
|
@ -32,6 +32,7 @@ ufw allow from 172.28.0.0/16 to any port 28333 comment 'allow Dojo zmqrawtx'
|
|||
ufw allow from 172.17.0.0/16 to any port 28334 comment 'allow Dojo zmqhashblock'
|
||||
ufw allow from 172.28.0.0/16 to any port 28334 comment 'allow Dojo zmqhashblock'
|
||||
ufw allow 8335 comment 'allow corsproxy for btc rpc'
|
||||
ufw allow 8443 comment 'allow Lightning Terminal'
|
||||
ufw allow 2222 comment 'allow WebSSH2'
|
||||
ufw allow 2223 comment 'allow WebSSH2 HTTPS'
|
||||
ufw allow 3000 comment 'allow LndHub'
|
||||
|
|
|
@ -67,6 +67,4 @@ RPCAUTH=$(gen_rpcauth.py mynode $PW)
|
|||
#sed -i "s/rpcpassword=.*/rpcpassword=$PW/g" /mnt/hdd/mynode/bitcoin/bitcoin.conf
|
||||
sed -i "s/rpcauth=.*/$RPCAUTH/g" /mnt/hdd/mynode/bitcoin/bitcoin.conf
|
||||
|
||||
cp -f /mnt/hdd/mynode/bitcoin/bitcoin.conf /home/admin/.bitcoin/bitcoin.conf
|
||||
chown bitcoin:bitcoin /mnt/hdd/mynode/bitcoin/bitcoin.conf
|
||||
chown admin:admin /home/admin/.bitcoin/bitcoin.conf
|
||||
|
|
23
rootfs/standard/usr/bin/mynode_gen_lit_config.sh
Executable file
23
rootfs/standard/usr/bin/mynode_gen_lit_config.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Setup Initial LND Node Name
|
||||
if [ ! -f /mnt/hdd/mynode/settings/.lndalias ]; then
|
||||
echo "mynodebtc.com [myNode]" > /mnt/hdd/mynode/settings/.lndalias
|
||||
fi
|
||||
|
||||
# Generate Lightning Terminal Config
|
||||
if [ -f /mnt/hdd/mynode/settings/lit_custom.conf ]; then
|
||||
# Use Custom Config
|
||||
cp -f /mnt/hdd/mynode/settings/lit_custom.conf /mnt/hdd/mynode/lit/lit.conf
|
||||
else
|
||||
# Generate a default config
|
||||
cp -f /usr/share/mynode/lit.conf /mnt/hdd/mynode/lit/lit.conf
|
||||
|
||||
# Adjust Mainnet/Testnet
|
||||
if [ -f /mnt/hdd/mynode/settings/.testnet_enabled ]; then
|
||||
sed -i "s/mainnet/testnet/g" /mnt/hdd/mynode/lit/lit.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
chown bitcoin:bitcoin /mnt/hdd/mynode/lit/lit.conf
|
|
@ -12,8 +12,7 @@ fi
|
|||
sleep 60s
|
||||
|
||||
# Give admin the ability to access the BTC cookie
|
||||
cp -f /mnt/hdd/mynode/bitcoin/.cookie /home/admin/.bitcoin/.cookie
|
||||
chown admin:admin /home/admin/.bitcoin/.cookie
|
||||
chmod 640 /mnt/hdd/mynode/bitcoin/.cookie
|
||||
|
||||
if [ -f /mnt/hdd/mynode/bitcoin/testnet3/.cookie ]; then
|
||||
mkdir -p /mnt/hdd/mynode/bitcoin/testnet3
|
||||
|
|
|
@ -31,6 +31,7 @@ mkdir -p /home/bitcoin/.mynode/
|
|||
chown -R bitcoin:bitcoin /home/bitcoin/.mynode/
|
||||
|
||||
# User updates and settings
|
||||
adduser admin bitcoin
|
||||
grep "joinmarket" /etc/sudoers || (echo 'joinmarket ALL=(ALL) NOPASSWD:ALL' | EDITOR='tee -a' visudo)
|
||||
|
||||
# Check if upgrades use tor
|
||||
|
@ -329,6 +330,41 @@ if [ "$CURRENT" != "$POOL_VERSION" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Upgrade Lightning Terminal
|
||||
echo "Upgrading lit..."
|
||||
LIT_ARCH="lightning-terminal-linux-armv7"
|
||||
if [ $IS_X86 = 1 ]; then
|
||||
LIT_ARCH="lightning-terminal-linux-amd64"
|
||||
fi
|
||||
LIT_UPGRADE_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/$LIT_ARCH-$LIT_VERSION.tar.gz
|
||||
CURRENT=""
|
||||
if [ -f $LIT_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $LIT_VERSION_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$LIT_VERSION" ]; then
|
||||
# Download and install lit
|
||||
rm -rf /opt/download
|
||||
mkdir -p /opt/download
|
||||
cd /opt/download
|
||||
|
||||
wget $LIT_UPGRADE_URL
|
||||
wget $LIT_UPGRADE_MANIFEST_URL -O manifest.txt
|
||||
wget $LIT_UPGRADE_MANIFEST_SIG_URL -O manifest.txt.sig
|
||||
|
||||
gpg --verify manifest.txt.sig manifest.txt
|
||||
if [ $? == 0 ]; then
|
||||
# Install lit
|
||||
tar -xzf lightning-terminal-*.tar.gz
|
||||
mv $LIT_ARCH-$LIT_VERSION lightning-terminal
|
||||
install -m 0755 -o root -g root -t /usr/local/bin lightning-terminal/lit*
|
||||
|
||||
# Mark current version
|
||||
echo $LIT_VERSION > $LIT_VERSION_FILE
|
||||
else
|
||||
echo "ERROR UPGRADING LIT - GPG FAILED"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install LndHub
|
||||
LNDHUB_UPGRADE_URL=https://github.com/BlueWallet/LndHub/archive/$LNDHUB_VERSION.tar.gz
|
||||
CURRENT=""
|
||||
|
@ -803,6 +839,7 @@ systemctl enable docker
|
|||
systemctl enable bitcoind
|
||||
systemctl enable seed_bitcoin_peers
|
||||
systemctl enable lnd
|
||||
systemctl enable litd
|
||||
systemctl enable firewall
|
||||
systemctl enable invalid_block_check
|
||||
systemctl enable usb_driver_check
|
||||
|
|
|
@ -25,6 +25,8 @@ elif [ "$APP" = "loop" ]; then
|
|||
rm -f $LOOP_VERSION_FILE
|
||||
elif [ "$APP" = "pool" ]; then
|
||||
rm -f $POOL_VERSION_FILE
|
||||
elif [ "$APP" = "lit" ]; then
|
||||
rm -f $LIT_VERSION_FILE
|
||||
elif [ "$APP" = "btcrpcexplorer" ]; then
|
||||
rm -f $BTCRPCEXPLORER_VERSION_FILE
|
||||
elif [ "$APP" = "caravan" ]; then
|
||||
|
@ -33,6 +35,8 @@ elif [ "$APP" = "corsproxy" ]; then
|
|||
rm -f $CORSPROXY_VERSION_FILE
|
||||
elif [ "$APP" = "joinmarket" ]; then
|
||||
rm -f $JOINMARKET_VERSION_FILE
|
||||
elif [ "$APP" = "joininbox" ]; then
|
||||
rm -f $JOININBOX_VERSION_FILE
|
||||
elif [ "$APP" = "lnbits" ]; then
|
||||
rm -f $LNBITS_VERSION_FILE
|
||||
elif [ "$APP" = "lndconnect" ]; then
|
||||
|
|
|
@ -204,6 +204,7 @@ useradd -m -s /bin/bash pivpn || true
|
|||
useradd -m -s /bin/bash joinmarket || true
|
||||
|
||||
# User updates and settings
|
||||
adduser admin bitcoin
|
||||
grep "joinmarket" /etc/sudoers || (echo 'joinmarket ALL=(ALL) NOPASSWD:ALL' | EDITOR='tee -a' visudo)
|
||||
|
||||
# Regen SSH keys (check if force regen or keys are missing / empty)
|
||||
|
@ -295,6 +296,8 @@ source /usr/bin/mynode_gen_loop_config.sh
|
|||
# Pool Config
|
||||
source /usr/bin/mynode_gen_pool_config.sh
|
||||
|
||||
# Lightning Terminal Config
|
||||
source /usr/bin/mynode_gen_lit_config.sh
|
||||
|
||||
# Setup symlinks for bitcoin user so they have access to commands
|
||||
users="bitcoin"
|
||||
|
@ -310,7 +313,7 @@ for u in $users; do
|
|||
done
|
||||
done
|
||||
|
||||
# Setup symlinks for adming (need to be careful here - lnd,bitcoin can't be symlinked)
|
||||
# Setup symlinks for admin (need to be careful here - lnd,bitcoin can't be symlinked)
|
||||
if [ ! -L /home/admin/.pool ]; then # Pool Config (symlink so admin user can run pool commands)
|
||||
mv /home/admin/.pool /home/admin/.pool_backup || true
|
||||
ln -s /mnt/hdd/mynode/pool /home/admin/.pool
|
||||
|
@ -320,6 +323,7 @@ if [ ! -L /home/admin/.loop ]; then # Loop Config (symlink so admin user can
|
|||
ln -s /mnt/hdd/mynode/loop /home/admin/.loop
|
||||
fi
|
||||
|
||||
|
||||
# Dojo - move to HDD
|
||||
if [ -d /opt/mynode/dojo ] && [ ! -d /mnt/hdd/mynode/dojo ] ; then
|
||||
mv /opt/mynode/dojo /mnt/hdd/mynode/dojo
|
||||
|
@ -511,6 +515,9 @@ fi
|
|||
if [ -f /mnt/hdd/mynode/joinmarket/joinmarket.cfg ]; then
|
||||
sed -i "s/rpc_password = .*/rpc_password = $BTCRPCPW/g" /mnt/hdd/mynode/joinmarket/joinmarket.cfg
|
||||
fi
|
||||
if [ -f /mnt/hdd/mynode/lit/lit.conf ]; then
|
||||
sed -i "s/faraday.bitcoin.password=.*/faraday.bitcoin.password=$BTCRPCPW/g" /mnt/hdd/mynode/lit/lit.conf
|
||||
fi
|
||||
if [ -f /mnt/hdd/mynode/mempool/.env ]; then
|
||||
sed -i "s/BITCOIN_RPC_PASS=.*/BITCOIN_RPC_PASS=$BTCRPCPW/g" /mnt/hdd/mynode/mempool/.env
|
||||
fi
|
||||
|
@ -519,8 +526,6 @@ chown bitcoin:bitcoin /mnt/hdd/mynode/settings/.btcrpc_environment
|
|||
if [ -f /mnt/hdd/mynode/bitcoin/bitcoin.conf ]; then
|
||||
sed -i "s/rpcauth=.*/$RPCAUTH/g" /mnt/hdd/mynode/bitcoin/bitcoin.conf
|
||||
fi
|
||||
cp -f /mnt/hdd/mynode/bitcoin/bitcoin.conf /home/admin/.bitcoin/bitcoin.conf
|
||||
chown admin:admin /home/admin/.bitcoin/bitcoin.conf
|
||||
|
||||
|
||||
# Append bitcoin UID and GID to btcrpc_environment
|
||||
|
@ -715,6 +720,7 @@ echo $BTC_VERSION > $BTC_LATEST_VERSION_FILE
|
|||
echo $LND_VERSION > $LND_LATEST_VERSION_FILE
|
||||
echo $LOOP_VERSION > $LOOP_LATEST_VERSION_FILE
|
||||
echo $POOL_VERSION > $POOL_LATEST_VERSION_FILE
|
||||
echo $LIT_VERSION > $LIT_LATEST_VERSION_FILE
|
||||
echo $ELECTRS_VERSION > $ELECTRS_LATEST_VERSION_FILE
|
||||
echo $LNDHUB_VERSION > $LNDHUB_LATEST_VERSION_FILE
|
||||
echo $CARAVAN_VERSION > $CARAVAN_LATEST_VERSION_FILE
|
||||
|
|
|
@ -25,7 +25,7 @@ fi
|
|||
|
||||
# Stop core services
|
||||
date
|
||||
systemctl stop electrs loopd lnd quicksync
|
||||
systemctl stop electrs loopd poold lnd quicksync
|
||||
date
|
||||
killall bitcoind || true
|
||||
systemctl stop bitcoind
|
||||
|
|
|
@ -6,5 +6,9 @@ if [ ! -f /mnt/hdd/mynode/settings/.lndpw ]; then
|
|||
< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-24} > /mnt/hdd/mynode/settings/.lndpw
|
||||
chmod 600 /mnt/hdd/mynode/settings/.lndpw
|
||||
fi
|
||||
if [ ! -f /mnt/hdd/mynode/settings/.litpw ]; then
|
||||
< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-12} > /mnt/hdd/mynode/settings/.litpw
|
||||
chmod 600 /mnt/hdd/mynode/settings/.litpw
|
||||
fi
|
||||
|
||||
exit 0
|
88
rootfs/standard/usr/share/mynode/lit.conf
Normal file
88
rootfs/standard/usr/share/mynode/lit.conf
Normal file
|
@ -0,0 +1,88 @@
|
|||
#######################################
|
||||
# Application Options
|
||||
#######################################
|
||||
httpslisten=0.0.0.0:8443
|
||||
uipassword_file=/mnt/hdd/mynode/settings/.litpw
|
||||
lit-dir=/mnt/hdd/mynode/lit
|
||||
|
||||
network=mainnet
|
||||
|
||||
lnd-mode=remote
|
||||
loop-mode=remote
|
||||
pool-mode=remote
|
||||
|
||||
# Remote options
|
||||
remote.lit-debuglevel=debug
|
||||
|
||||
# Remote lnd options
|
||||
remote.lnd.rpcserver=localhost:10009
|
||||
remote.lnd.macaroonpath=/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon
|
||||
remote.lnd.tlscertpath=/mnt/hdd/mynode/lnd/tls.cert
|
||||
|
||||
# Remote loop options
|
||||
remote.loop.rpcserver=localhost:11010
|
||||
remote.loop.macaroonpath=/mnt/hdd/mynode/loop/mainnet/loop.macaroon
|
||||
remote.loop.tlscertpath=/mnt/hdd/mynode/loop/mainnet/tls.cert
|
||||
|
||||
# Remote pool options
|
||||
remote.pool.rpcserver=localhost:12010
|
||||
remote.pool.macaroonpath=/mnt/hdd/mynode/pool/mainnet/pool.macaroon
|
||||
remote.pool.tlscertpath=/mnt/hdd/mynode/pool/mainnet/tls.cert
|
||||
|
||||
#######################################
|
||||
# Loop
|
||||
#######################################
|
||||
#loop.loopdir=/mnt/hdd/mynode/loop
|
||||
#loop.loopoutmaxparts=5
|
||||
|
||||
#######################################
|
||||
# Pool
|
||||
#######################################
|
||||
#pool.basedir=/mnt/hdd/mynode/pool
|
||||
#pool.newnodesonly=true
|
||||
|
||||
#######################################
|
||||
# Faraday
|
||||
#######################################
|
||||
faraday.faradaydir=/mnt/hdd/mynode/faraday
|
||||
faraday.min_monitored=48h
|
||||
|
||||
# Faraday - bitcoin
|
||||
faraday.connect_bitcoin=true
|
||||
faraday.bitcoin.host=localhost
|
||||
faraday.bitcoin.user=mynode
|
||||
faraday.bitcoin.password=password
|
||||
|
||||
#######################################
|
||||
# LND - STILL USING REMOTE NODE FOR NOW
|
||||
#######################################
|
||||
# lnd.maxpendingchannels=5
|
||||
# lnd.alias=myNode [LND]
|
||||
# lnd.color=#68F442
|
||||
|
||||
# # Tor-only by default
|
||||
# lnd.listen=localhost
|
||||
|
||||
# lnd.rpclisten=0.0.0.0:10009
|
||||
# lnd.restlisten=0.0.0.0:10080
|
||||
|
||||
# lnd.tlsextraip=0.0.0.0
|
||||
# lnd.tlsextradomain=mynode.local
|
||||
|
||||
# lnd.debuglevel=info
|
||||
# #lnd.debuglevel=debug
|
||||
|
||||
# lnd.ignore-historical-gossip-filters=true
|
||||
# lnd.accept-keysend=true
|
||||
# lnd.caches.channel-cache-size=35000
|
||||
|
||||
# lnd.bitcoin.active=1
|
||||
# lnd.bitcoin.mainnet=1
|
||||
# lnd.bitcoin.node=bitcoind
|
||||
|
||||
# lnd.bitcoind.rpchost=127.0.0.1:8332
|
||||
|
||||
# #lnd.autopilot.active=1
|
||||
# #lnd.autopilot.maxchannels=5
|
||||
# #lnd.autopilot.allocation=0.6
|
||||
|
|
@ -22,6 +22,12 @@ POOL_LATEST_VERSION_FILE=/home/bitcoin/.mynode/pool_version_latest
|
|||
POOL_UPGRADE_MANIFEST_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/manifest-$POOL_VERSION.txt
|
||||
POOL_UPGRADE_MANIFEST_SIG_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/manifest-$POOL_VERSION.txt.sig
|
||||
|
||||
LIT_VERSION="v0.4.1-alpha"
|
||||
LIT_VERSION_FILE=/home/bitcoin/.mynode/lit_version
|
||||
LIT_LATEST_VERSION_FILE=/home/bitcoin/.mynode/lit_version_latest
|
||||
LIT_UPGRADE_MANIFEST_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/manifest-$LIT_VERSION.txt
|
||||
LIT_UPGRADE_MANIFEST_SIG_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/manifest-guggero-$LIT_VERSION.sig
|
||||
|
||||
ELECTRS_VERSION="v0.8.6"
|
||||
ELECTRS_VERSION_FILE=/home/bitcoin/.mynode/electrs_version
|
||||
ELECTRS_LATEST_VERSION_FILE=/home/bitcoin/.mynode/electrs_version_latest
|
||||
|
|
|
@ -17,6 +17,7 @@ lnd_ready = False
|
|||
lnd_version = None
|
||||
loop_version = None
|
||||
pool_version = None
|
||||
lit_version = None
|
||||
lightning_peers = None
|
||||
lightning_peer_aliases = {}
|
||||
lightning_channels = None
|
||||
|
@ -244,6 +245,9 @@ def gen_new_wallet_seed():
|
|||
seed = subprocess.check_output("python3 /usr/bin/gen_seed.py", shell=True)
|
||||
return seed
|
||||
|
||||
def get_lnd_lit_password():
|
||||
return get_file_contents("/mnt/hdd/mynode/settings/.litpw")
|
||||
|
||||
def restart_lnd_actual():
|
||||
global lnd_ready
|
||||
lnd_ready = False
|
||||
|
@ -382,6 +386,13 @@ def get_pool_version():
|
|||
pool_version = subprocess.check_output("poold --version | egrep -o '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n 1", shell=True)
|
||||
return "v{}".format(pool_version)
|
||||
|
||||
def get_lit_version():
|
||||
global lit_version
|
||||
if lit_version == None:
|
||||
#lit_version = subprocess.check_output("litd --version | egrep -o '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n 1", shell=True)
|
||||
lit_version = "TODO"
|
||||
return "v{}".format(lit_version)
|
||||
|
||||
def get_default_lnd_config():
|
||||
try:
|
||||
with open("/usr/share/mynode/lnd.conf") as f:
|
||||
|
|
|
@ -155,6 +155,7 @@ def page_lnd():
|
|||
"pubkey": pubkey,
|
||||
"uri": uri,
|
||||
"ip": ip,
|
||||
"lit_password": get_lnd_lit_password(),
|
||||
"lnd_deposit_address": lnd_deposit_address,
|
||||
"channel_balance": format_sat_amount(balance_info["channel_balance"]),
|
||||
"channel_pending": format_sat_amount(balance_info["channel_pending"]),
|
||||
|
|
|
@ -20,6 +20,7 @@ def caravan_page():
|
|||
apps.append({"name":"LND", "short_name": "lnd"})
|
||||
apps.append({"name":"Loop", "short_name": "loop"})
|
||||
apps.append({"name":"Pool", "short_name": "pool"})
|
||||
apps.append({"name":"Lightning Terminal", "short_name": "lit"})
|
||||
#apps.append({"name":"Electrum Server", "short_name": "electrs"})
|
||||
apps.append({"name":"BTC RPC Explorer", "short_name": "btcrpcexplorer"})
|
||||
apps.append({"name":"Corsproxy", "short_name": "corsproxy"})
|
||||
|
@ -31,6 +32,7 @@ def caravan_page():
|
|||
# Premium Apps
|
||||
if not is_community_edition():
|
||||
apps.append({"name":"Joinmarket", "short_name": "joinmarket"})
|
||||
apps.append({"name":"JoininBox", "short_name": "joininbox"})
|
||||
apps.append({"name":"Thunderhub", "short_name": "thunderhub"})
|
||||
apps.append({"name":"LNbits", "short_name": "lnbits"})
|
||||
apps.append({"name":"Caravan", "short_name": "caravan"})
|
||||
|
|
BIN
rootfs/standard/var/www/mynode/static/images/lit.png
Normal file
BIN
rootfs/standard/var/www/mynode/static/images/lit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
rootfs/standard/var/www/mynode/static/images/lit_purple.png
Normal file
BIN
rootfs/standard/var/www/mynode/static/images/lit_purple.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -51,7 +51,12 @@
|
|||
{% endif %}
|
||||
<div class="app_contents">
|
||||
{% if lnd_ready %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="lndconnect">Pair Wallet</a>
|
||||
<a style="width: 37px;" class="ui-button ui-widget ui-corner-all mynode_button" id="lit" href="#" title="Open Lightning Terminal">
|
||||
<img style="width: 16px;" src="{{ url_for('static', filename="images/lit.png")}}"/>
|
||||
</a>
|
||||
<a style="width: 37px;" class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="lndconnect" title="Pair Wallet">
|
||||
<img style="width: 16px;" src="{{ url_for('static', filename="images/qr_code.png")}}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if lnd_wallet_exists %}
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="/lnd">Wallet</a>
|
||||
|
|
|
@ -64,10 +64,33 @@
|
|||
});
|
||||
|
||||
$("#rtl").on("click", function() {
|
||||
url = 'https://'+location.hostname+':3011';
|
||||
port="3010"
|
||||
if (location.protocol == "https:") {
|
||||
port="3011"
|
||||
}
|
||||
url = location.protocol+'//'+location.hostname+':'+port
|
||||
window.open(url,'_blank');
|
||||
})
|
||||
|
||||
$("#thunderhub").on("click", function() {
|
||||
port="3030"
|
||||
if (location.protocol == "https:") {
|
||||
port="3031"
|
||||
}
|
||||
url = location.protocol+'//'+location.hostname+':'+port
|
||||
window.open(url,'_blank');
|
||||
})
|
||||
|
||||
$("#lit").on("click", function() {
|
||||
url = 'https://'+location.hostname+':8443'
|
||||
window.open(url,'_blank');
|
||||
})
|
||||
|
||||
$("#show_lit_password").on("click", function() {
|
||||
$("#show_lit_password").hide(0);
|
||||
$("#lit_password").show();
|
||||
});
|
||||
|
||||
function show_deposit_address(addr) {
|
||||
$("#lnd_deposit_address_text").html( addr );
|
||||
$("#lnd_deposit_address_qrcode").attr("src", "/api/get_qr_code_image?url="+addr);
|
||||
|
@ -168,6 +191,16 @@
|
|||
<div class="info_tile_header">Lightning</div>
|
||||
<div class="info_tile_contents">
|
||||
<table class="info_table">
|
||||
{% if wallet_logged_in %}
|
||||
<tr>
|
||||
<th>Lightning Terminal</th>
|
||||
<td>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button_small" id="lit" style="width: 100px;" href="#">open</a>
|
||||
<span id="lit_password" style="display: none; margin: 0;">{{lit_password}}</span>
|
||||
<a id="show_lit_password" class="ui-button ui-widget ui-corner-all mynode_button_small" style="width: 100px;">show password</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if wallet_exists %}
|
||||
<tr>
|
||||
<th>TLS Certification</th>
|
||||
|
@ -392,11 +425,21 @@
|
|||
<div class="app_title">RTL</div>
|
||||
<div class="app_status"></div>
|
||||
<div class="app_contents">
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="rtl">Access Wallet</a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="rtl">Open Wallet</a>
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="https://mynodebtc.com/guide/rtl" target="_blank">RTL Guide</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="app_tile_short">
|
||||
<div class="app_status_icon"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/thunderhub.png")}}"/></div>
|
||||
<div class="app_title">Thunderhub</div>
|
||||
<div class="app_status"></div>
|
||||
<div class="app_contents">
|
||||
<a class="ui-button ui-widget ui-corner-all mynode_button" href="#" id="thunderhub">Open Wallet</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="app_tile_short">
|
||||
<div class="app_status_icon"></div>
|
||||
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/zap.png")}}"/></div>
|
||||
|
|
|
@ -65,6 +65,7 @@ def page_tor():
|
|||
v3_services.append(create_v3_service("Thunderhub", general_onion_url, "3030 / 3031", True, ""))
|
||||
v3_services.append(create_v3_service("Mempool", general_onion_url, "4080 / 4081", True, ""))
|
||||
v3_services.append(create_v3_service("LNbits", general_onion_url, "5000 / 5001", True, ""))
|
||||
v3_services.append(create_v3_service("Lightning Terminal", general_onion_url, "8443", True, ""))
|
||||
v3_services.append(create_v3_service("Whirlpool", general_onion_url, "8899", False, ""))
|
||||
v3_services.append(create_v3_service("Netdata", general_onion_url, "19999 / 20000", True, ""))
|
||||
v3_services.append(create_v3_service("Specter Desktop", general_onion_url, "25441", True, "", force_https=True))
|
||||
|
|
|
@ -102,6 +102,9 @@ source /tmp/mynode_app_versions.sh
|
|||
# Create any necessary users
|
||||
useradd -m -s /bin/bash joinmarket || true
|
||||
|
||||
# User updates
|
||||
adduser admin bitcoin
|
||||
|
||||
# Setup bitcoin user folders
|
||||
mkdir -p /home/bitcoin/.mynode/
|
||||
chown -R bitcoin:bitcoin /home/bitcoin/.mynode/
|
||||
|
@ -307,6 +310,7 @@ if [ "$CURRENT" != "$BTC_VERSION" ]; then
|
|||
tar -xvf bitcoin-$BTC_VERSION-$ARCH.tar.gz
|
||||
mv bitcoin-$BTC_VERSION bitcoin
|
||||
install -m 0755 -o root -g root -t /usr/local/bin bitcoin/bin/*
|
||||
|
||||
if [ ! -L /home/bitcoin/.bitcoin ]; then
|
||||
sudo -u bitcoin ln -s /mnt/hdd/mynode/bitcoin /home/bitcoin/.bitcoin
|
||||
fi
|
||||
|
@ -348,8 +352,8 @@ if [ "$CURRENT" != "$LND_VERSION" ]; then
|
|||
fi
|
||||
cd ~
|
||||
|
||||
# Install Loopd
|
||||
echo "Installing loopd..."
|
||||
# Install Loop
|
||||
echo "Installing loop..."
|
||||
LOOP_ARCH="loop-linux-armv7"
|
||||
if [ $IS_X86 = 1 ]; then
|
||||
LOOP_ARCH="loop-linux-amd64"
|
||||
|
@ -418,6 +422,44 @@ if [ "$CURRENT" != "$POOL_VERSION" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Install Lightning Terminal
|
||||
echo "Installing lit..."
|
||||
LIT_ARCH="lightning-terminal-linux-armv7"
|
||||
if [ $IS_X86 = 1 ]; then
|
||||
LIT_ARCH="lightning-terminal-linux-amd64"
|
||||
fi
|
||||
LIT_UPGRADE_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/$LIT_ARCH-$LIT_VERSION.tar.gz
|
||||
LIT_UPGRADE_MANIFEST_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/manifest-$LIT_VERSION.txt
|
||||
LIT_UPGRADE_MANIFEST_SIG_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/manifest-$LIT_VERSION.txt.asc
|
||||
CURRENT=""
|
||||
if [ -f $LIT_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $LIT_VERSION_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$LIT_VERSION" ]; then
|
||||
# Download and install lit
|
||||
rm -rf /opt/download
|
||||
mkdir -p /opt/download
|
||||
cd /opt/download
|
||||
|
||||
wget $LIT_UPGRADE_URL
|
||||
wget $LIT_UPGRADE_MANIFEST_URL
|
||||
wget $LIT_UPGRADE_MANIFEST_SIG_URL
|
||||
|
||||
gpg --verify manifest-*.txt.asc
|
||||
if [ $? == 0 ]; then
|
||||
# Install lit
|
||||
tar -xzf lightning-terminal-*.tar.gz
|
||||
mv $LIT_ARCH-$LIT_VERSION lightning-terminal
|
||||
install -m 0755 -o root -g root -t /usr/local/bin lightning-terminal/lit*
|
||||
|
||||
# Mark current version
|
||||
echo $LIT_VERSION > $LIT_VERSION_FILE
|
||||
else
|
||||
echo "ERROR UPGRADING LIT - GPG FAILED"
|
||||
fi
|
||||
fi
|
||||
cd ~
|
||||
|
||||
|
||||
# Setup "install" location for some apps
|
||||
mkdir -p /opt/mynode
|
||||
|
|
Loading…
Reference in New Issue
Block a user