mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-17 21:31:45 +01:00
commit
4fa4edd310
@ -4,6 +4,7 @@
|
||||
- Update: Bitcoin Core v25.0.0 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-25.0.md)
|
||||
- Update: LND v0.16.4-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.16.4-beta)
|
||||
- Update: Core Lightning v23.05.2 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.05.2)
|
||||
- Update: Suez - Channel Visualization for LND & CLN [details](https://github.com/prusnak/suez)
|
||||
- Update: Electrum Server in Rust (electrs) v0.10.0 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0100-jul-22-2023)
|
||||
- Update: C-lightningREST v0.10.5 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.5)
|
||||
- Update: RTL v0.14.0 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.14.0)
|
||||
@ -14,6 +15,7 @@
|
||||
- Update: LNbits 0.10.9 [details](https://github.com/lnbits/lnbits/releases/tag/0.10.9)
|
||||
- Update: BTCPayServer 1.10.3 (postgres by default with sqlite migration) [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.10.3)
|
||||
- Update: Specter Desktop 1.13.1 [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v1.13.1)
|
||||
- Update: Kindle-Display 0.5.1 [details](https://github.com/dennisreimann/kindle-display/)
|
||||
- Fix: Homebanking Interface FinTS/HBCI (experimental) [details](https://github.com/rootzoll/raspiblitz/issues/1186)
|
||||
|
||||
## What's new in Version 1.9.0 of RaspiBlitz?
|
||||
|
55
README.md
55
README.md
@ -1,9 +1,10 @@
|
||||
<!-- omit in toc -->
|
||||
# 
|
||||
|
||||
# 
|
||||
|
||||
_Build your own Lightning & Bitcoin Fullnode on a RaspberryPi with an optional Display._
|
||||
|
||||
`Version 1.10.0rc2 with bitcoin 25.0.0, lnd 0.16.4 & Core Lightning 23.05.2` ([api](https://github.com/fusion44/blitz_api)|[web](https://github.com/cstenglein/raspiblitz-web))
|
||||
`Version 1.10.0rc2 with bitcoin 25.0.0, lnd 0.16.4 & Core Lightning 23.05.2` ([api](https://github.com/fusion44/blitz_api)|[web](https://github.com/raspiblitz/raspiblitz-web))
|
||||
|
||||

|
||||
|
||||
@ -14,25 +15,27 @@ Discover & develop the growing ecosystem of the Lightning Network by becoming a
|
||||
Build it as part of a [workshop](WORKSHOP.md) or as a weekend project yourself.
|
||||
|
||||
---
|
||||
|
||||
<!-- omit in toc -->
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Feature Overview](#feature-overview)
|
||||
- [Time Estimate to Set Up a RaspiBlitz](#time-estimate-to-set-up-a-raspiblitz)
|
||||
- [Hardware Needed](#hardware-needed)
|
||||
- [Assemble your RaspiBlitz](#assemble-your-raspiblitz)
|
||||
- [Downloading the Software](#downloading-the-software)
|
||||
- [Write the SD-Card image to your SD Card](#write-the-sd-card-image-to-your-sd-card)
|
||||
- [Boot your RaspiBlitz](#boot-your-raspiblitz)
|
||||
- [Support](#support)
|
||||
- [Setup Process (Detailed Documentation)](#setup-process-detailed-documentation)
|
||||
- [Import a Migration File](#import-a-migration-file)
|
||||
- [Make a RaspiBlitz out of your Umbrel, Citadel or MyNode](#make-a-raspiblitz-out-of-your-umbrel-citadel-or-mynode)
|
||||
- [Interface / APIs](#interface--apis)
|
||||
- [Updating RaspiBlitz to new Version](#updating-raspiblitz-to-new-version)
|
||||
- [Build the SD Card Image](#build-the-sd-card-image)
|
||||
- [FAQ](#faq)
|
||||
- [Community Development](#community-development)
|
||||
- [Feature Overview](#feature-overview)
|
||||
- [Time Estimate to Set Up a RaspiBlitz](#time-estimate-to-set-up-a-raspiblitz)
|
||||
- [Hardware Needed](#hardware-needed)
|
||||
- [Assemble your RaspiBlitz](#assemble-your-raspiblitz)
|
||||
- [Downloading the Software](#downloading-the-software)
|
||||
- [Write the SD-Card image to your SD Card](#write-the-sd-card-image-to-your-sd-card)
|
||||
- [Boot your RaspiBlitz](#boot-your-raspiblitz)
|
||||
- [Support](#support)
|
||||
- [Setup Process (Detailed Documentation)](#setup-process-detailed-documentation)
|
||||
- [Import a Migration File](#import-a-migration-file)
|
||||
- [Make a RaspiBlitz out of your Umbrel, Citadel or MyNode](#make-a-raspiblitz-out-of-your-umbrel-citadel-or-mynode)
|
||||
- [Interface / APIs](#interface--apis)
|
||||
- [Updating RaspiBlitz to new Version](#updating-raspiblitz-to-new-version)
|
||||
- [Build the SD Card Image](#build-the-sd-card-image)
|
||||
- [FAQ](#faq)
|
||||
- [Community Development](#community-development)
|
||||
|
||||
---
|
||||
|
||||
@ -132,7 +135,7 @@ _If the above mentioned LCD screen is sold out you can also use these different
|
||||
|
||||
- Quimat 3,5'' Zoll Inch Touch
|
||||
- ELEGOO Display 3.5" Zoll TFT LCD
|
||||
- kuman 3.5 Inch Touch Screen TFT Monitor
|
||||
- kuman 3.5 Inch Touch Screen TFT Monitor
|
||||
- Waveshare 3.5inch Display for Raspberry Pi
|
||||
|
||||
With all LCD screen models dont use the ones that have an HDMI port/connector - what you need is a 3.5 inch LCD screen model (resolution of 480×320) that connects only thru the GPIO ports (SPI) and has an XPT2046 touch controller.
|
||||
@ -164,10 +167,10 @@ In this section you find the latest ready-to-use RaspiBlitz SDcard images. Basic
|
||||
|
||||
This is the sd card image you should choose if your at the beginning of your RaspiBlitz journey or you are a casual node runner wanna download the next update/upgrade - with WebUI & fast installing bonus apps.
|
||||
|
||||
*WARNING: THIS IS STILL A RELEASE CANDIDATE VERSION</br>
|
||||
JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!*
|
||||
_WARNING: THIS IS STILL A RELEASE CANDIDATE VERSION</br>
|
||||
JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!_
|
||||
|
||||
- __FATPACK SD CARD IMAGE ⮕ [raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz)__
|
||||
- **FATPACK SD CARD IMAGE ⮕ [raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz)**
|
||||
- SHA-256: a1a187a655a7b9b9ba6b3b1609d555a801f6be754d6fd209dfede9ff9e7379b8
|
||||
<!--- GPG 64-bit (main): 1C73 060C 7C17 6461 & (sub): AA9D D1B5 CC56 47DA
|
||||
- Signature-File: [raspiblitz-fat-v1.9.0-2023-05-22.img.gz.sig](https://raspiblitz.fulmo.org/images/raspiblitz-fat-v1.9.0-2023-05-22.img.gz.sig)
|
||||
@ -178,10 +181,10 @@ JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!*
|
||||
|
||||
This is the sd card image for RaspiBlitz users that are already more experienced and want to use just a limited set of features of the RaspiBlitz. This image has just the bare minimum of features pre-installed - LCD & HDMI output is off by default. Setup, Update or Recovery needs to be done thru SSH login - API & WebUI are later available but are not preinstalled/activated by default. The RaspiBlitz will download & compile just the tools that are in your ´raspiblitz.conf´ - this will take longer but as a trade-off this RaspiBlitz then just runs with a reduced set of dependencies and so a minimalized attack vector and better performance. Its for the serious & experienced node runners.
|
||||
|
||||
*WARNING: THIS IS STILL A RELEASE CANDIDATE VERSION</br>
|
||||
JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!*
|
||||
_WARNING: THIS IS STILL A RELEASE CANDIDATE VERSION</br>
|
||||
JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!_
|
||||
|
||||
- __MINIMAL SD CARD IMAGE ⮕ [raspiblitz-min-v1.10.0rc2-2023-08-02.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.10.0rc2-2023-08-02.img.gz)__
|
||||
- **MINIMAL SD CARD IMAGE ⮕ [raspiblitz-min-v1.10.0rc2-2023-08-02.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.10.0rc2-2023-08-02.img.gz)**
|
||||
- SHA-256: d2775524f5e51770294d873a9418b445041d98b97606c4510c3e322a180f9806
|
||||
<!-- - GPG 64-bit (main): 1C73 060C 7C17 6461 & (sub): AA9D D1B5 CC56 47DA
|
||||
- Signature-File: [raspiblitz-min-v1.9.0-2023-05-22.img.gz.sig](https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.9.0-2023-05-22.img.gz.sig)
|
||||
@ -1296,7 +1299,7 @@ Run the command below to generate root SSH keys:
|
||||
`sudo /home/admin/config.scripts/blitz.ssh.sh root-get`
|
||||
The public key is found in the `sshPubKey=` section of the above output. For manual setup, use the value after the = without the single quotes.
|
||||
|
||||
Copy the generated keys from above to the remote server (note, if your remote server doesn't allow password authentication, you will have to copy it manually).
|
||||
Copy the generated keys from above to the remote server (note, if your remote server doesn't allow password authentication, you will have to copy it manually).
|
||||
`sudo /home/admin/config.scripts/blitz.ssh.sh root-transfer myuser@myserver`
|
||||
|
||||
Note: If you do not copy the public key to your remote server, these backups will not work.
|
||||
|
@ -32,7 +32,7 @@ Options:
|
||||
-h, --help this help info
|
||||
-i, --interaction [0|1] interaction before proceeding with exection (default: 1)
|
||||
-f, --fatpack [0|1] fatpack mode (default: 1)
|
||||
-u, --github-user [rootzoll|other] github user to be checked from the repo (default: ${defaultRepo})
|
||||
-u, --github-user [raspiblitz|other] github user to be checked from the repo (default: ${defaultRepo})
|
||||
-b, --branch [v1.7|v1.8] branch to be built on (default: ${defaultBranch})
|
||||
-d, --display [lcd|hdmi|headless] display class (default: lcd)
|
||||
-t, --tweak-boot-drive [0|1] tweak boot drives (default: 1)
|
||||
@ -291,7 +291,7 @@ HandleLidSwitchDocked=ignore" | tee /etc/systemd/logind.conf.d/nosuspend.conf
|
||||
# https://github.com/rootzoll/raspiblitz/issues/138
|
||||
# https://daker.me/2014/10/how-to-fix-perl-warning-setting-locale-failed-in-raspbian.html
|
||||
# https://stackoverflow.com/questions/38188762/generate-all-locales-in-a-docker-image
|
||||
if [ "${baseimage}" = "raspios_arm64" ] || [ "${cpu}" = aarch64 ] && [ "${baseimage}" = "debian" ]; then
|
||||
if [ "${baseimage}" = "raspios_arm64" ] || [ "${baseimage}" = "debian" ]; then
|
||||
echo -e "\n*** FIXING LOCALES FOR BUILD ***"
|
||||
sed -i "s/^# en_US.UTF-8 UTF-8.*/en_US.UTF-8 UTF-8/g" /etc/locale.gen
|
||||
sed -i "s/^# en_US ISO-8859-1.*/en_US ISO-8859-1/g" /etc/locale.gen
|
||||
@ -397,7 +397,7 @@ if [ "$(compgen -u | grep -c pi)" -eq 0 ];then
|
||||
fi
|
||||
|
||||
# special prepare when Raspbian
|
||||
if [ "${baseimage}" = "raspios_arm64" ] || [ "${architecture}" = "aarch64" ] && [ "${baseimage}" = "debian" ]; then
|
||||
if [ "${baseimage}" = "raspios_arm64" ] || [ "${baseimage}" = "debian" ]; then
|
||||
|
||||
echo -e "\n*** PREPARE RASPBERRY OS VARIANTS ***"
|
||||
apt_install raspi-config
|
||||
@ -697,7 +697,7 @@ echo "Activating CACHE RAM DISK ... "
|
||||
/home/admin/_cache.sh keyvalue on
|
||||
|
||||
# *** Wifi, Bluetooth & other RaspberryPi configs ***
|
||||
if [ "${baseimage}" = "raspios_arm64" ] || [ "${architecture}" = "aarch64" ] && [ "${baseimage}" = "debian" ]; then
|
||||
if [ "${baseimage}" = "raspios_arm64" ] || [ "${baseimage}" = "debian" ]; then
|
||||
|
||||
if [ "${wifi_region}" == "off" ]; then
|
||||
echo -e "\n*** DISABLE WIFI ***"
|
||||
@ -786,7 +786,9 @@ else
|
||||
echo "* skipping FATPACK"
|
||||
fi
|
||||
|
||||
# check fallback list bitnodes
|
||||
# check fallback list bitnodes
|
||||
# update on releases manually in asset folder with:
|
||||
# curl -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/snapshots/latest/ -o ./fallback.bitnodes.nodes
|
||||
byteSizeList=$(sudo -u admin stat -c %s /home/admin/fallback.bitnodes.nodes)
|
||||
if [ ${#byteSizeList} -eq 0 ] || [ ${byteSizeList} -lt 10240 ]; then
|
||||
echo "Using fallback list from repo: bitnodes"
|
||||
@ -796,6 +798,8 @@ fi
|
||||
chown admin:admin /home/admin/fallback.bitnodes.nodes
|
||||
|
||||
# check fallback list bitcoin core
|
||||
# update on releases manually in asset folder with:
|
||||
# curl https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/seeds/nodes_main.txt -o ./fallback.bitcoin.nodes
|
||||
byteSizeList=$(sudo -u admin stat -c %s /home/admin/fallback.bitcoin.nodes)
|
||||
if [ ${#byteSizeList} -eq 0 ] || [ ${byteSizeList} -lt 10240 ]; then
|
||||
echo "Using fallback list from repo: bitcoin core"
|
||||
|
@ -744,6 +744,30 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
echo "# setting PASSWORD A" >> ${logFile}
|
||||
sudo /home/admin/config.scripts/blitz.passwords.sh set a "${passwordA}" >> ${logFile}
|
||||
|
||||
# Bitcoin Mainnet
|
||||
if [ "${mainnet}" == "on" ] || [ "${chain}" == "main" ]; then
|
||||
echo "Provisioning ${network} Mainnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on mainnet >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Mainnet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Testnet
|
||||
if [ "${testnet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Testnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on testnet >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Testnet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Signet
|
||||
if [ "${signet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Signet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on signet >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Signet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# if setup - run provision setup first
|
||||
if [ "${setupPhase}" == "setup" ]; then
|
||||
echo "Calling _provision.setup.sh for basic setup tasks .." >> $logFile
|
||||
|
@ -93,8 +93,12 @@ if [ "${network}" == "bitcoin" ]; then
|
||||
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
||||
echo "kbSizeRAM(${kbSizeRAM})" >> ${logFile}
|
||||
echo "dont forget to reduce dbcache once IBD is done" > "/mnt/hdd/${network}/blocks/selfsync.flag"
|
||||
# RP4 8GB
|
||||
if [ ${kbSizeRAM} -gt 7500000 ]; then
|
||||
echo "Detected RAM >=8GB --> optimizing ${network}.conf" >> ${logFile}
|
||||
sed -i "s/^dbcache=.*/dbcache=4096/g" /mnt/hdd/${network}/${network}.conf
|
||||
# RP4 4GB
|
||||
if [ ${kbSizeRAM} -gt 3500000 ]; then
|
||||
elif [ ${kbSizeRAM} -gt 3500000 ]; then
|
||||
echo "Detected RAM >=4GB --> optimizing ${network}.conf" >> ${logFile}
|
||||
sed -i "s/^dbcache=.*/dbcache=2560/g" /mnt/hdd/${network}/${network}.conf
|
||||
# RP4 2GB
|
||||
@ -113,7 +117,7 @@ echo ""
|
||||
echo "*** Start ${network} (SETUP) ***" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Blockchain Testrun"
|
||||
echo "- This can take a while .." >> ${logFile}
|
||||
cp /home/admin/assets/${network}d.service /etc/systemd/system/${network}d.service
|
||||
systemctl daemon-reload >> ${logFile}
|
||||
systemctl enable ${network}d.service
|
||||
systemctl start ${network}d.service
|
||||
|
||||
|
@ -167,7 +167,6 @@ echo "*** Start ${network} (UPDATE) ***" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Blockchain Testrun"
|
||||
echo "- This can take a while .." >> ${logFile}
|
||||
chown -R bitcoin:bitcoin /mnt/hdd/${network} >>${logFile} 2>&1
|
||||
cp /home/admin/assets/${network}d.service /etc/systemd/system/${network}d.service
|
||||
systemctl daemon-reload >> ${logFile}
|
||||
systemctl enable ${network}d.service >> ${logFile}
|
||||
systemctl start ${network}d.service >> ${logFile}
|
||||
|
@ -265,34 +265,6 @@ else
|
||||
echo "Provisioning CL interims update - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Mainnet
|
||||
if [ "${mainnet}" == "on" ] || [ "${chain}" == "main" ]; then
|
||||
echo "Provisioning ${network} Mainnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on mainnet >> ${logFile} 2>&1
|
||||
systemctl start bitcoind >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Mainnet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
|
||||
# Bitcoin Testnet
|
||||
if [ "${testnet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Testnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on testnet >> ${logFile} 2>&1
|
||||
systemctl start tbitcoind >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Testnet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Signet
|
||||
if [ "${signet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Signet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on signet >> ${logFile} 2>&1
|
||||
systemctl start sbitcoind >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Signet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# LND binary install
|
||||
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ] || [ "${tlnd}" == "on" ] || [ "${slnd}" == "on" ]; then
|
||||
# if already installed by fatpack will skip
|
||||
|
@ -1,3 +1,3 @@
|
||||
# RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1')
|
||||
codeVersion="1.10.0rc2"
|
||||
codeVersion="1.10.0rc3"
|
||||
# keep last line with comment
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -212,8 +212,9 @@ Check 'sudo nginx -t' for a detailed error message.
|
||||
echo "- as manual server set '${localIP}' & '${portSSL}'"
|
||||
echo "- laptop and RaspiBlitz need to be within same local network"
|
||||
echo
|
||||
echo "To start directly from laptop terminal use:"
|
||||
echo "electrum --oneserver --server ${localIP}:${portSSL}:s"
|
||||
echo "To start directly from laptop terminal use"
|
||||
echo "PC: electrum --oneserver --server ${localIP}:${portSSL}:s"
|
||||
echo "MAC: open -a /Applications/Electrum.app --args --oneserver --server ${localIP}:${portSSL}:s"
|
||||
if [ ${TorRunning} -eq 1 ]; then
|
||||
echo
|
||||
echo "The Tor Hidden Service address for electrs is (see LCD for QR code):"
|
||||
|
@ -10,12 +10,13 @@ CONFIG_FILE=$APP_DATA_DIR/.env
|
||||
APP_ROOT_DIR=$HOME_DIR/kindle-display
|
||||
APP_SERVER_DIR=$APP_ROOT_DIR/server
|
||||
CRON_FILE=$APP_SERVER_DIR/cron.sh
|
||||
APP_VERSION=0.4.0
|
||||
APP_VERSION=0.5.1
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "small config script to switch kindle-display on or off"
|
||||
echo "bonus.kindle-display.sh [on|off]"
|
||||
echo "bonus.kindle-display.sh [update]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -172,6 +173,48 @@ PATH=/bin:/usr/bin:/usr/local/bin
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# update
|
||||
if [ "$1" = "update" ]; then
|
||||
isInstalled=$(sudo ls $HOME_DIR 2>/dev/null | grep -c kindle-display)
|
||||
if [ ${isInstalled} -gt 0 ]; then
|
||||
echo "*** UPDATE KINDLE-DISPLAY ***"
|
||||
cd $HOME_DIR || exit 1
|
||||
|
||||
current=$(node -p "require('./kindle-display/server/package.json').version")
|
||||
if [ "$current" = "$APP_VERSION" ]; then
|
||||
echo "*** KINDLE-DISPLAY IS ALREADY UPDATED TO $APP_VERSION ***"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sudo systemctl stop kindle-display
|
||||
sudo -u $USERNAME wget https://github.com/dennisreimann/kindle-display/archive/v$APP_VERSION.tar.gz
|
||||
sudo -u $USERNAME tar -xzf v$APP_VERSION.tar.gz kindle-display-$APP_VERSION/server
|
||||
sudo -u $USERNAME mv kindle-display{,-backup}
|
||||
sudo -u $USERNAME mv kindle-display{-$APP_VERSION,}
|
||||
sudo -u $USERNAME rm v$APP_VERSION.tar.gz
|
||||
cd kindle-display/server
|
||||
sudo -u $USERNAME npm install
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
fi
|
||||
# link config to app
|
||||
sudo -u $USERNAME ln -s $CONFIG_FILE $APP_SERVER_DIR/.env
|
||||
# generate initial data
|
||||
echo "# run data.sh"
|
||||
sudo -u $USERNAME $APP_SERVER_DIR/data.sh
|
||||
cd -
|
||||
sudo systemctl start kindle-display
|
||||
sudo -u $USERNAME rm -rf kindle-display-backup
|
||||
|
||||
echo "*** KINDLE-DISPLAY UPDATED to $APP_VERSION ***"
|
||||
else
|
||||
echo "*** KINDLE-DISPLAY IS NOT INSTALLED ***"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# switch off
|
||||
if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
echo "*** UNINSTALL KINDLE-DISPLAY ***"
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://github.com/prusnak/suez/commits/master
|
||||
SUEZVERSION="bcfd3502ac1f7d95b90c62c1daeae50aa7052be7"
|
||||
# reactivate PGP verification if the pinned / last commit is signed
|
||||
SUEZVERSION="d055a1f8b4a81488c72f60da9b51b0f0932c5146"
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
@ -41,8 +42,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo -u bitcoin git clone https://github.com/prusnak/suez.git
|
||||
cd suez || exit 1
|
||||
sudo -u bitcoin git reset --hard $SUEZVERSION
|
||||
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
||||
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
|
||||
# sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
||||
# "${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
|
||||
sudo -u bitcoin poetry install
|
||||
|
||||
# make sure default virtaulenv is used
|
||||
@ -87,8 +88,8 @@ if [ "$1" = "update" ]; then
|
||||
fi
|
||||
cd suez || exit 1
|
||||
sudo -u bitcoin git pull
|
||||
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
||||
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
|
||||
# sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
||||
# "${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
|
||||
sudo -u bitcoin poetry install
|
||||
echo "# Updated to the latest in https://github.com/prusnak/suez/commits/master"
|
||||
|
||||
|
@ -169,6 +169,25 @@ if [ ${mode} = "lnd-export" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if a backup device is connected (and has enogh free space) copy it there
|
||||
source <(/home/admin/config.scripts/blitz.backupdevice.sh status)
|
||||
if [ $isMounted == 1 ]; then
|
||||
|
||||
# get free space in bytes from backup device
|
||||
freeSpace=$(df | grep -m1 "/mnt/backup" | awk '{print $4}')
|
||||
|
||||
# subtract 50MB for safety
|
||||
freeSpace=$(expr ${freeSpace} - 50000000)
|
||||
|
||||
# check if enough space on backup device
|
||||
if [ ${freeSpace} -gt ${byteSize} ]; then
|
||||
echo "# making copy to backup device ..."
|
||||
sudo cp ${downloadPath}/lnd-rescue-${md5checksum}.tar.gz /mnt/backup/lnd-rescue-${md5checksum}.tar.gz
|
||||
else
|
||||
echo "# not enough space on backup device for extra copy'"
|
||||
fi
|
||||
fi
|
||||
|
||||
# output result data
|
||||
echo "# lnd service is stopped for security"
|
||||
echo "filename='${downloadPath}/lnd-rescue-${md5checksum}.tar.gz'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user