This commit is contained in:
rootzoll
2022-05-30 20:27:04 +02:00
6 changed files with 82 additions and 72 deletions

View File

@@ -18,7 +18,7 @@
- Update: CLBOSS 0.13A [details](https://github.com/ZmnSCPxj/clboss/releases/tag/0.13A) - Update: CLBOSS 0.13A [details](https://github.com/ZmnSCPxj/clboss/releases/tag/0.13A)
- Update: Channel Tools (chantools) v0.10.4 [details](https://github.com/guggero/chantools/blob/master/README.md) - Update: Channel Tools (chantools) v0.10.4 [details](https://github.com/guggero/chantools/blob/master/README.md)
- Update: Electrum Server in Rust (electrs) v0.9.7 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#097-apr-30-2022) - Update: Electrum Server in Rust (electrs) v0.9.7 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#097-apr-30-2022)
- Update: BTCPayServer v1.5.1 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.5.1) - Update: BTCPayServer v1.5.4 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.5.4)
- Update: Helipad (Podcasting 2.0 Boostagram reader) v0.1.10 [details](https://github.com/Podcastindex-org/helipad/releases/tag/v0.1.10) - Update: Helipad (Podcasting 2.0 Boostagram reader) v0.1.10 [details](https://github.com/Podcastindex-org/helipad/releases/tag/v0.1.10)
- Info: Run RaspiBlitz on VirtualBox & TrueNAS [details](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms) - Info: Run RaspiBlitz on VirtualBox & TrueNAS [details](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms)

View File

@@ -91,6 +91,7 @@ Type=simple
Restart=always Restart=always
StandardOutput=journal StandardOutput=journal
StandardError=journal StandardError=journal
RestartSec=60
# Hardening measures # Hardening measures
PrivateTmp=true PrivateTmp=true

View File

@@ -5,11 +5,7 @@
# https://github.com/dgarage/NBXplorer/tags # https://github.com/dgarage/NBXplorer/tags
NBXplorerVersion="v2.2.20" NBXplorerVersion="v2.2.20"
# https://github.com/btcpayserver/btcpayserver/releases # https://github.com/btcpayserver/btcpayserver/releases
BTCPayVersion="v1.5.1" BTCPayVersion="v1.5.4"
PGPsigner="nicolasdorier"
PGPpubkeyLink="https://keybase.io/nicolasdorier/pgp_keys.asc"
PGPpubkeyFingerprint="AB4CFA9895ACA0DBE27F6B346618763EF09186FE"
# command info # command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@@ -340,6 +336,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
cd NBXplorer || exit 1 cd NBXplorer || exit 1
sudo -u btcpay git reset --hard $NBXplorerVersion sudo -u btcpay git reset --hard $NBXplorerVersion
# PGP verify # PGP verify
PGPsigner="nicolasdorier"
PGPpubkeyLink="https://keybase.io/nicolasdorier/pgp_keys.asc"
PGPpubkeyFingerprint="AB4CFA9895ACA0DBE27F6B346618763EF09186FE"
sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \ sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1 "${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
echo "# Build NBXplorer ..." echo "# Build NBXplorer ..."
@@ -436,6 +437,10 @@ btc.rpc.password=$PASSWORD_B
# sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \ # sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \
# "web-flow" "https://github.com/web-flow.gpg" "4AEE18F83AFDEB23" || exit 1 # "web-flow" "https://github.com/web-flow.gpg" "4AEE18F83AFDEB23" || exit 1
PGPsigner="Kukks"
PGPpubkeyLink="https://github.com/${PGPsigner}.gpg"
PGPpubkeyFingerprint="8E5530D9D1C93097"
sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \ sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1 "${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
@@ -547,6 +552,10 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
sudo systemctl stop btcpayserver sudo systemctl stop btcpayserver
sudo systemctl disable btcpayserver sudo systemctl disable btcpayserver
sudo rm /etc/systemd/system/btcpayserver.service sudo rm /etc/systemd/system/btcpayserver.service
else
echo "# The btcpayserver.service is not installed."
fi
# nbxplorer # nbxplorer
sudo systemctl stop nbxplorer sudo systemctl stop nbxplorer
sudo systemctl disable nbxplorer sudo systemctl disable nbxplorer
@@ -580,12 +589,11 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
echo "# keeping data" echo "# keeping data"
fi fi
echo "# OK BTCPayServer removed." echo "# OK BTCPayServer removed."
else
echo "# BTCPayServer is not installed."
fi
# needed for API/WebUI as signal that install ran thru # needed for API/WebUI as signal that install ran thru
echo "result='OK'" echo "result='OK'"
exit 0
fi fi
if [ "$1" = "update" ]; then if [ "$1" = "update" ]; then

View File

@@ -72,9 +72,9 @@ if [ "${isInstalled}" == "1" ]; then
fi fi
# if the action parameter `info` was called - just stop here and output all # if the action parameter `status` was called - just stop here and output all
# status information as a key=value list # status information as a key=value list
if [ "$1" = "menu" ]; then if [ "$1" = "status" ]; then
echo "appID='${APPID}'" echo "appID='${APPID}'"
echo "githubRepo='${GITHUB_REPO}'" echo "githubRepo='${GITHUB_REPO}'"
echo "githubVersion='${GITHUB_VERSION}'" echo "githubVersion='${GITHUB_VERSION}'"
@@ -153,7 +153,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on
# create a dedicated user for the app # create a dedicated user for the app
# BACKGROUND is here to separate running apps by unix users # BACKGROUND is here to seperate running apps by unix users
# and only give file write access to the rest of the system where needed. # and only give file write access to the rest of the system where needed.
echo "# create user" echo "# create user"
sudo adduser --disabled-password --gecos "" ${APPID} || exit 1 sudo adduser --disabled-password --gecos "" ${APPID} || exit 1
@@ -169,7 +169,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# BACKGROUND is that any critical data that needs to survive an update should # BACKGROUND is that any critical data that needs to survive an update should
# be stored in that app-data directory. All data there will also be part of # be stored in that app-data directory. All data there will also be part of
# any raspiblitz data migration. Also on install handle the case that there # any raspiblitz data migration. Also on install handle the case that there
# is already data from a previous install available the user wants to # is already data from a pervious install available the user wants to
# continue to use and even may come from an older version from your app. # continue to use and even may come from an older version from your app.
if ! [ -d /mnt/hdd/app-data/${APPID} ]; then if ! [ -d /mnt/hdd/app-data/${APPID} ]; then
@@ -194,7 +194,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# BACKGROUND is that now you download the code from github, reset to a given version tag/commit, # BACKGROUND is that now you download the code from github, reset to a given version tag/commit,
# verify the author. If you app provides its source/binaries in another way, may check # verify the author. If you app provides its source/binaries in another way, may check
# other install scripts to see how that implement code download & verify. # other install scripts to see how that implement code download & verify.
echo "# download from source code & verify" echo "# download the source code & verify"
sudo -u ${APPID} git clone ${GITHUB_REPO} /home/${APPID}/${APPID} sudo -u ${APPID} git clone ${GITHUB_REPO} /home/${APPID}/${APPID}
cd /home/${APPID}/${APPID} cd /home/${APPID}/${APPID}
sudo -u ${APPID} git reset --hard $GITHUB_VERSION sudo -u ${APPID} git reset --hard $GITHUB_VERSION
@@ -283,7 +283,7 @@ server {
" | sudo tee /etc/nginx/sites-available/${APPID}_ssl.conf " | sudo tee /etc/nginx/sites-available/${APPID}_ssl.conf
sudo ln -sf /etc/nginx/sites-available/${APPID}_ssl.conf /etc/nginx/sites-enabled/ sudo ln -sf /etc/nginx/sites-available/${APPID}_ssl.conf /etc/nginx/sites-enabled/
# write the TOR config # write the Tor config
echo " echo "
server { server {
listen localhost:${PORT_TOR_CLEAR}; listen localhost:${PORT_TOR_CLEAR};
@@ -298,7 +298,7 @@ server {
" | sudo tee /etc/nginx/sites-available/${APPID}_tor.conf " | sudo tee /etc/nginx/sites-available/${APPID}_tor.conf
sudo ln -sf /etc/nginx/sites-available/${APPID}_tor.conf /etc/nginx/sites-enabled/ sudo ln -sf /etc/nginx/sites-available/${APPID}_tor.conf /etc/nginx/sites-enabled/
# write the TOR+HTTPS config # write the Tor+HTTPS config
echo " echo "
server { server {
listen localhost:${PORT_TOR_SSL} ssl; listen localhost:${PORT_TOR_SSL} ssl;
@@ -387,7 +387,7 @@ if [ "$1" = "prestart" ]; then
fi fi
########################################### ###########################################
# OFF / DEINSTALL # OFF / UNINSTALL
# call with parameter `delete-data` to also # call with parameter `delete-data` to also
# delete the persistent data directory # delete the persistent data directory
########################################### ###########################################
@@ -429,7 +429,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
sudo rm -r /mnt/hdd/app-data/${APPID} sudo rm -r /mnt/hdd/app-data/${APPID}
fi fi
echo "# OK - app should be deinstalled now" echo "# OK - app should be uninstalled now"
exit 0 exit 0
fi fi

View File

@@ -52,7 +52,7 @@ sudo systemctl stop lnd
sudo touch /home/admin/lnd.db.bolt.auto-compact.log sudo touch /home/admin/lnd.db.bolt.auto-compact.log
sudo chmod 777 /home/admin/lnd.db.bolt.auto-compact.log sudo chmod 777 /home/admin/lnd.db.bolt.auto-compact.log
echo "# Run LND with --db.bolt.auto-compact" echo "# Run LND with --db.bolt.auto-compact"
sudo -u bitcoin /usr/local/bin/lnd --configfile=/home/bitcoin/.lnd/lnd.conf --db.bolt.auto-compact > /home/admin/lnd.db.bolt.auto-compact.log & sudo -u bitcoin /usr/local/bin/lnd --configfile=/home/bitcoin/.lnd/lnd.conf --db.bolt.auto-compact --db.bolt.auto-compact-min-age=0 > /home/admin/lnd.db.bolt.auto-compact.log &
echo "# Compacting channel.db, this can take a long time" echo "# Compacting channel.db, this can take a long time"

View File

@@ -29,12 +29,13 @@ if [ "$1" == "off" ]; then
sudo sed -i "/# Hidden Service for ${service}/,/^\s*$/{d}" "${torrc_services}" sudo sed -i "/# Hidden Service for ${service}/,/^\s*$/{d}" "${torrc_services}"
# remove double empty lines # remove double empty lines
_temp=$(mktemp -p /dev/shm/)
sudo mkdir /var/cache/raspiblitz/tmp 2>/dev/null sudo mkdir /var/cache/raspiblitz/tmp 2>/dev/null
sudo cp "${torrc_services}" /var/cache/raspiblitz/tmp sudo cp "${torrc_services}" /var/cache/raspiblitz/tmp
sudo chmod 777 /var/cache/raspiblitz/tmp sudo chmod 777 /var/cache/raspiblitz/tmp
sudo chown -R admin:admin /var/cache/raspiblitz/tmp sudo chown -R admin:admin /var/cache/raspiblitz/tmp
sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' "${torrc_services}" > /var/cache/raspiblitz/tmp sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' "${torrc_services}" > "${_temp}"
sudo mv /var/cache/raspiblitz/tmp "${torrc_services}" sudo mv "${_temp}" "${torrc_services}"
sudo chmod 644 "${torrc_services}" sudo chmod 644 "${torrc_services}"
sudo chown bitcoin:bitcoin "${torrc_services}" sudo chown bitcoin:bitcoin "${torrc_services}"