mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-28 18:52:11 +01:00
commit
d158345bab
@ -3,7 +3,7 @@
|
|||||||
- Update: RaspiOS base image from 2023-05-03
|
- Update: RaspiOS base image from 2023-05-03
|
||||||
- Update: Bitcoin Core v25.0.0 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-25.0.md)
|
- 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: 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: Core Lightning v23.08 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.08)
|
||||||
- Update: Suez - Channel Visualization for LND & CLN [details](https://github.com/prusnak/suez)
|
- 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: 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: C-lightningREST v0.10.5 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.5)
|
||||||
@ -17,6 +17,7 @@
|
|||||||
- Update: Specter Desktop 1.13.1 [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v1.13.1)
|
- 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/)
|
- 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)
|
- Fix: Homebanking Interface FinTS/HBCI (experimental) [details](https://github.com/rootzoll/raspiblitz/issues/1186)
|
||||||
|
- Remove: Spark Wallet and Sparko CLN plugin (not maintained anymore)
|
||||||
|
|
||||||
## What's new in Version 1.9.0 of RaspiBlitz?
|
## What's new in Version 1.9.0 of RaspiBlitz?
|
||||||
|
|
||||||
|
@ -89,12 +89,6 @@ fi
|
|||||||
if [ "${lndg}" == "on" ]; then
|
if [ "${lndg}" == "on" ]; then
|
||||||
OPTIONS+=(LNDG "LNDg (auto-rebalance, auto-fees)")
|
OPTIONS+=(LNDG "LNDg (auto-rebalance, auto-fees)")
|
||||||
fi
|
fi
|
||||||
if [ "${sparko}" == "on" ]; then
|
|
||||||
OPTIONS+=(SPARKO "Sparko Webwallet")
|
|
||||||
fi
|
|
||||||
if [ "${spark}" == "on" ]; then
|
|
||||||
OPTIONS+=(SPARK "Spark Wallet")
|
|
||||||
fi
|
|
||||||
if [ "${ElectRS}" == "on" ]; then
|
if [ "${ElectRS}" == "on" ]; then
|
||||||
OPTIONS+=(ELECTRS "Electrum Rust Server")
|
OPTIONS+=(ELECTRS "Electrum Rust Server")
|
||||||
fi
|
fi
|
||||||
@ -278,12 +272,6 @@ case $CHOICE in
|
|||||||
LNDG)
|
LNDG)
|
||||||
/home/admin/config.scripts/bonus.lndg.sh menu
|
/home/admin/config.scripts/bonus.lndg.sh menu
|
||||||
;;
|
;;
|
||||||
SPARKO)
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu mainnet
|
|
||||||
;;
|
|
||||||
SPARK)
|
|
||||||
/home/admin/config.scripts/cl.spark.sh menu mainnet
|
|
||||||
;;
|
|
||||||
LNBITS)
|
LNBITS)
|
||||||
/home/admin/config.scripts/bonus.lnbits.sh menu
|
/home/admin/config.scripts/bonus.lnbits.sh menu
|
||||||
;;
|
;;
|
||||||
|
@ -13,8 +13,6 @@ if [ ${#rtlWebinterface} -eq 0 ]; then rtlWebinterface="off"; fi
|
|||||||
if [ ${#lnd} -eq 0 ]; then lnd="off"; fi
|
if [ ${#lnd} -eq 0 ]; then lnd="off"; fi
|
||||||
if [ ${#cl} -eq 0 ]; then cl="off"; fi
|
if [ ${#cl} -eq 0 ]; then cl="off"; fi
|
||||||
if [ ${#crtlWebinterface} -eq 0 ]; then crtlWebinterface="off"; fi
|
if [ ${#crtlWebinterface} -eq 0 ]; then crtlWebinterface="off"; fi
|
||||||
if [ ${#sparko} -eq 0 ]; then sparko="off"; fi
|
|
||||||
if [ ${#spark} -eq 0 ]; then spark="off"; fi
|
|
||||||
|
|
||||||
# show select dialog
|
# show select dialog
|
||||||
echo "run dialog ..."
|
echo "run dialog ..."
|
||||||
@ -24,8 +22,6 @@ OPTIONS+=(l "LND on $CHAIN" ${lnd})
|
|||||||
OPTIONS+=(r "RTL for LND $CHAIN" ${rtlWebinterface})
|
OPTIONS+=(r "RTL for LND $CHAIN" ${rtlWebinterface})
|
||||||
OPTIONS+=(c "Core Lightning on $CHAIN" ${cl})
|
OPTIONS+=(c "Core Lightning on $CHAIN" ${cl})
|
||||||
OPTIONS+=(t "RTL for CL on $CHAIN" ${crtlWebinterface})
|
OPTIONS+=(t "RTL for CL on $CHAIN" ${crtlWebinterface})
|
||||||
OPTIONS+=(s "Sparko for CL on $CHAIN" ${sparko})
|
|
||||||
OPTIONS+=(m "Spark for CL on $CHAIN" ${spark})
|
|
||||||
|
|
||||||
CHOICES=$(dialog --title ' Additional Services ' \
|
CHOICES=$(dialog --title ' Additional Services ' \
|
||||||
--checklist ' use spacebar to activate/de-activate ' \
|
--checklist ' use spacebar to activate/de-activate ' \
|
||||||
@ -145,50 +141,6 @@ else
|
|||||||
echo "RTL for CL $CHAIN Setting unchanged."
|
echo "RTL for CL $CHAIN Setting unchanged."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sparko process choice
|
|
||||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "s")
|
|
||||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
|
||||||
if [ "${sparko}" != "${choice}" ]; then
|
|
||||||
echo "# Sparko on $CHAIN Setting changed .."
|
|
||||||
anychange=1
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh ${choice} $CHAIN
|
|
||||||
errorOnInstall=$?
|
|
||||||
if [ "${choice}" = "on" ]; then
|
|
||||||
if [ ${errorOnInstall} -eq 0 ]; then
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu $CHAIN
|
|
||||||
else
|
|
||||||
l1="# FAIL on Sparko on $CHAIN install #"
|
|
||||||
l2="# Try manual install on terminal after reboot with:"
|
|
||||||
l3="/home/admin/config.scripts/cl-plugin.sparko.sh on $CHAIN"
|
|
||||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "# Sparko on $CHAIN Setting unchanged."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# spark process choice
|
|
||||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "m")
|
|
||||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
|
||||||
if [ "${spark}" != "${choice}" ]; then
|
|
||||||
echo "# Spark Wallet on $CHAIN Setting changed .."
|
|
||||||
anychange=1
|
|
||||||
/home/admin/config.scripts/cl.spark.sh ${choice} $CHAIN
|
|
||||||
errorOnInstall=$?
|
|
||||||
if [ "${choice}" = "on" ]; then
|
|
||||||
if [ ${errorOnInstall} -eq 0 ]; then
|
|
||||||
/home/admin/config.scripts/cl.spark.sh menu $CHAIN
|
|
||||||
else
|
|
||||||
l1="# FAIL on Spark Wallet on $CHAIN install #"
|
|
||||||
l2="# Try manual install on terminal after reboot with:"
|
|
||||||
l3="/home/admin/config.scripts/cl.spark.sh on $CHAIN"
|
|
||||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "# Spark Wallet on $CHAIN Setting unchanged."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${anychange} -eq 0 ]; then
|
if [ ${anychange} -eq 0 ]; then
|
||||||
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
|
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -13,8 +13,6 @@ if [ ${#trtlWebinterface} -eq 0 ]; then trtlWebinterface="off"; fi
|
|||||||
if [ ${#tlnd} -eq 0 ]; then tlnd="off"; fi
|
if [ ${#tlnd} -eq 0 ]; then tlnd="off"; fi
|
||||||
if [ ${#tcrtlWebinterface} -eq 0 ]; then tcrtlWebinterface="off"; fi
|
if [ ${#tcrtlWebinterface} -eq 0 ]; then tcrtlWebinterface="off"; fi
|
||||||
if [ ${#tcl} -eq 0 ]; then tcl="off"; fi
|
if [ ${#tcl} -eq 0 ]; then tcl="off"; fi
|
||||||
if [ ${#tsparko} -eq 0 ]; then tsparko="off"; fi
|
|
||||||
if [ ${#tspark} -eq 0 ]; then tspark="off"; fi
|
|
||||||
|
|
||||||
# show select dialog
|
# show select dialog
|
||||||
echo "run dialog ..."
|
echo "run dialog ..."
|
||||||
@ -24,8 +22,6 @@ OPTIONS+=(l "LND on $CHAIN" ${tlnd})
|
|||||||
OPTIONS+=(r "RTL for LND $CHAIN" ${trtlWebinterface})
|
OPTIONS+=(r "RTL for LND $CHAIN" ${trtlWebinterface})
|
||||||
OPTIONS+=(c "Core Lightning on $CHAIN" ${tcl})
|
OPTIONS+=(c "Core Lightning on $CHAIN" ${tcl})
|
||||||
OPTIONS+=(t "RTL for CL on $CHAIN" ${tcrtlWebinterface})
|
OPTIONS+=(t "RTL for CL on $CHAIN" ${tcrtlWebinterface})
|
||||||
OPTIONS+=(s "Sparko for CL on $CHAIN" ${tsparko})
|
|
||||||
OPTIONS+=(m "Spark Wallet fro CL on $CHAIN" ${tspark})
|
|
||||||
|
|
||||||
CHOICES=$(dialog --title ' Additional Services ' \
|
CHOICES=$(dialog --title ' Additional Services ' \
|
||||||
--checklist ' use spacebar to activate/de-activate ' \
|
--checklist ' use spacebar to activate/de-activate ' \
|
||||||
@ -142,50 +138,6 @@ else
|
|||||||
echo "RTL for CL $CHAIN Setting unchanged."
|
echo "RTL for CL $CHAIN Setting unchanged."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# tsparko process choice
|
|
||||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "s")
|
|
||||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
|
||||||
if [ "${tsparko}" != "${choice}" ]; then
|
|
||||||
echo "# Sparko on $CHAIN Setting changed .."
|
|
||||||
anychange=1
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh ${choice} $CHAIN
|
|
||||||
errorOnInstall=$?
|
|
||||||
if [ "${choice}" = "on" ]; then
|
|
||||||
if [ ${errorOnInstall} -eq 0 ]; then
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu $CHAIN
|
|
||||||
else
|
|
||||||
l1="# FAIL on Sparko on $CHAIN install #"
|
|
||||||
l2="# Try manual install on terminal after reboot with:"
|
|
||||||
l3="/home/admin/config.scripts/cl-plugin.sparko.sh on $CHAIN"
|
|
||||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "# Sparko on $CHAIN Setting unchanged."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# tspark process choice
|
|
||||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "m")
|
|
||||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
|
||||||
if [ "${tspark}" != "${choice}" ]; then
|
|
||||||
echo "# Spark Wallet on $CHAIN Setting changed .."
|
|
||||||
anychange=1
|
|
||||||
/home/admin/config.scripts/cl.spark.sh ${choice} $CHAIN
|
|
||||||
errorOnInstall=$?
|
|
||||||
if [ "${choice}" = "on" ]; then
|
|
||||||
if [ ${errorOnInstall} -eq 0 ]; then
|
|
||||||
/home/admin/config.scripts/cl.spark.sh menu $CHAIN
|
|
||||||
else
|
|
||||||
l1="# FAIL on Spark Wallet on $CHAIN install #"
|
|
||||||
l2="# Try manual install on terminal after reboot with:"
|
|
||||||
l3="/home/admin/config.scripts/cl.spark.sh on $CHAIN"
|
|
||||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "# Spark Wallet on $CHAIN Setting unchanged."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${anychange} -eq 0 ]; then
|
if [ ${anychange} -eq 0 ]; then
|
||||||
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
|
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -28,8 +28,6 @@ if [ ${#lndg} -eq 0 ]; then lndg="off"; fi
|
|||||||
if [ ${#whitepaper} -eq 0 ]; then whitepaper="off"; fi
|
if [ ${#whitepaper} -eq 0 ]; then whitepaper="off"; fi
|
||||||
if [ ${#chantools} -eq 0 ]; then chantools="off"; fi
|
if [ ${#chantools} -eq 0 ]; then chantools="off"; fi
|
||||||
if [ ${#homer} -eq 0 ]; then homer="off"; fi
|
if [ ${#homer} -eq 0 ]; then homer="off"; fi
|
||||||
if [ ${#sparko} -eq 0 ]; then sparko="off"; fi
|
|
||||||
if [ ${#spark} -eq 0 ]; then spark="off"; fi
|
|
||||||
if [ ${#tallycoinConnect} -eq 0 ]; then tallycoinConnect="off"; fi
|
if [ ${#tallycoinConnect} -eq 0 ]; then tallycoinConnect="off"; fi
|
||||||
if [ ${#helipad} -eq 0 ]; then helipad="off"; fi
|
if [ ${#helipad} -eq 0 ]; then helipad="off"; fi
|
||||||
if [ ${#bitcoinminds} -eq 0 ]; then bitcoinminds="off"; fi
|
if [ ${#bitcoinminds} -eq 0 ]; then bitcoinminds="off"; fi
|
||||||
@ -82,8 +80,6 @@ fi
|
|||||||
# just available for CL
|
# just available for CL
|
||||||
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
||||||
OPTIONS+=(ca 'Core Lightning RTL Webinterface' ${crtlWebinterface})
|
OPTIONS+=(ca 'Core Lightning RTL Webinterface' ${crtlWebinterface})
|
||||||
OPTIONS+=(ka 'Core Lightning Sparko WebWallet' ${sparko})
|
|
||||||
OPTIONS+=(na 'Core Lightning Spark Wallet' ${spark})
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OPTIONS+=(ma 'Homer Dashboard' ${homer})
|
OPTIONS+=(ma 'Homer Dashboard' ${homer})
|
||||||
@ -662,50 +658,6 @@ else
|
|||||||
echo "BitcoinMinds setting unchanged."
|
echo "BitcoinMinds setting unchanged."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sparko process choice
|
|
||||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ka")
|
|
||||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
|
||||||
if [ "${sparko}" != "${choice}" ]; then
|
|
||||||
echo "# Sparko on mainnet Setting changed .."
|
|
||||||
anychange=1
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh ${choice} mainnet
|
|
||||||
errorOnInstall=$?
|
|
||||||
if [ "${choice}" = "on" ]; then
|
|
||||||
if [ ${errorOnInstall} -eq 0 ]; then
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu mainnet
|
|
||||||
else
|
|
||||||
l1="# FAIL on Sparko on mainnet install #"
|
|
||||||
l2="# Try manual install on terminal after reboot with:"
|
|
||||||
l3="/home/admin/config.scripts/cl-plugin.sparko.sh on mainnet"
|
|
||||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "# Sparko on mainnet Setting unchanged."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# spark wallet process choice
|
|
||||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "na")
|
|
||||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
|
||||||
if [ "${spark}" != "${choice}" ]; then
|
|
||||||
echo "# Spark Wallet on mainnet Setting changed .."
|
|
||||||
anychange=1
|
|
||||||
/home/admin/config.scripts/cl.spark.sh ${choice} mainnet
|
|
||||||
errorOnInstall=$?
|
|
||||||
if [ "${choice}" = "on" ]; then
|
|
||||||
if [ ${errorOnInstall} -eq 0 ]; then
|
|
||||||
/home/admin/config.scripts/cl.spark.sh menu mainnet
|
|
||||||
else
|
|
||||||
l1="# FAIL on Spark Wallet on mainnet install #"
|
|
||||||
l2="# Try manual install on terminal after reboot with:"
|
|
||||||
l3="/home/admin/config.scripts/cl.spark.sh on mainnet"
|
|
||||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "# Spark Wallet on mainnet Setting unchanged."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# squeaknode process choice
|
# squeaknode process choice
|
||||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "qa")
|
choice="off"; check=$(echo "${CHOICES}" | grep -c "qa")
|
||||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||||
|
@ -81,8 +81,6 @@ fi
|
|||||||
|
|
||||||
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
||||||
OPTIONS+=(ZEUS_CLREST "Zeus to Core LightningREST (Android or iOS)")
|
OPTIONS+=(ZEUS_CLREST "Zeus to Core LightningREST (Android or iOS)")
|
||||||
OPTIONS+=(ZEUS_SPARK "Zeus to Sparko (Android or iOS)")
|
|
||||||
OPTIONS+=(SPARK "Spark Wallet to Sparko (Android - EXPERIMENTAL)" )
|
|
||||||
OPTIONS+=(FULLYNODED_CL "Fully Noded to CL REST (iOS+Tor)")
|
OPTIONS+=(FULLYNODED_CL "Fully Noded to CL REST (iOS+Tor)")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -283,37 +281,4 @@ ZEUS_CLREST)
|
|||||||
/home/admin/config.scripts/cl.rest.sh connect
|
/home/admin/config.scripts/cl.rest.sh connect
|
||||||
exit 0;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
ZEUS_SPARK)
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
|
|
||||||
whiptail --title "Install Zeus on your Android or iOS Phone" \
|
|
||||||
--yes-button "Continue" \
|
|
||||||
--no-button "Cancel" \
|
|
||||||
--yesno "Open the https://zeusln.app/ on your mobile phone to find the App Store link or binary for your phone.\n\nWhen the app is installed and started --> Continue." 12 65
|
|
||||||
if [ $? -eq 1 ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh connect
|
|
||||||
exit 0;
|
|
||||||
;;
|
|
||||||
SPARK)
|
|
||||||
appstoreLink="https://github.com/shesek/spark-wallet#mobile-app"
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
|
|
||||||
whiptail --title "Install Zeus on your Android Phone" \
|
|
||||||
--yes-button "Continue" \
|
|
||||||
--no-button "GitHub link" \
|
|
||||||
--yesno "Open the ${appstoreLink} on Android to find the App Store link or binary for your phone.\n\nWhen the app is installed and started --> Continue." 12 65
|
|
||||||
if [ $? -eq 1 ]; then
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh qr ${appstoreLink}
|
|
||||||
whiptail --title " GitHub link " --msgbox "\
|
|
||||||
To install app open the following link:\n
|
|
||||||
${appstoreLink}\n
|
|
||||||
Or scan the QR code on the LCD with your mobile phone.
|
|
||||||
" 11 70
|
|
||||||
fi
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh connect
|
|
||||||
exit 0;
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
@ -56,7 +56,7 @@ configFile="/mnt/hdd/raspiblitz.conf"
|
|||||||
# INFOFILE - persited state data
|
# INFOFILE - persited state data
|
||||||
infoFile="/home/admin/raspiblitz.info"
|
infoFile="/home/admin/raspiblitz.info"
|
||||||
|
|
||||||
# better readbale seconds (slightly off to reduce same time window trigger)
|
# better readable seconds (slightly off to reduce same time window trigger)
|
||||||
MINUTE=60
|
MINUTE=60
|
||||||
MINUTE2=115
|
MINUTE2=115
|
||||||
MINUTE5=290
|
MINUTE5=290
|
||||||
@ -78,17 +78,17 @@ usermod -G bitcoin root
|
|||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
# init values
|
# init values
|
||||||
/home/admin/_cache.sh set system_temp_celsius "0"
|
/home/admin/_cache.sh init system_temp_celsius "0"
|
||||||
/home/admin/_cache.sh set system_temp_fahrenheit "0"
|
/home/admin/_cache.sh init system_temp_fahrenheit "0"
|
||||||
/home/admin/_cache.sh set system_count_longscan "0"
|
/home/admin/_cache.sh init system_count_longscan "0"
|
||||||
/home/admin/_cache.sh set system_count_undervoltage "0"
|
/home/admin/_cache.sh init system_count_undervoltage "0"
|
||||||
/home/admin/_cache.sh set system_count_start_blockchain "0"
|
/home/admin/_cache.sh init system_count_start_blockchain "0"
|
||||||
/home/admin/_cache.sh set system_count_start_lightning "0"
|
/home/admin/_cache.sh init system_count_start_lightning "0"
|
||||||
/home/admin/_cache.sh set system_count_start_tui "0"
|
/home/admin/_cache.sh init system_count_start_tui "0"
|
||||||
/home/admin/_cache.sh set btc_default_peers "0"
|
/home/admin/_cache.sh init btc_default_peers "0"
|
||||||
/home/admin/_cache.sh set btc_default_sync_percentage "0"
|
/home/admin/_cache.sh init btc_default_sync_percentage "0"
|
||||||
/home/admin/_cache.sh set btc_default_address ""
|
/home/admin/_cache.sh init btc_default_address ""
|
||||||
/home/admin/_cache.sh set btc_default_port ""
|
/home/admin/_cache.sh init btc_default_port ""
|
||||||
|
|
||||||
# import all base values from raspiblitz.info
|
# import all base values from raspiblitz.info
|
||||||
echo "importing: ${infoFile}"
|
echo "importing: ${infoFile}"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# 2) KEY-VALUE STORE for system state infos (REDIS)
|
# 2) KEY-VALUE STORE for system state infos (REDIS)
|
||||||
|
|
||||||
# SECURITY NOTE: The files on the RAMDISK can be set with unix file permissions and so restrict certain users access.
|
# SECURITY NOTE: The files on the RAMDISK can be set with unix file permissions and so restrict certain users access.
|
||||||
# But all data stored in the KEY-VALUE STORE has to be asumed as system-wide public information.
|
# But all data stored in the KEY-VALUE STORE has to be assumed as system-wide public information.
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; then
|
||||||
@ -14,6 +14,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ];
|
|||||||
echo "_cache.sh ramdisk [on|off]"
|
echo "_cache.sh ramdisk [on|off]"
|
||||||
echo "_cache.sh keyvalue [on|off]"
|
echo "_cache.sh keyvalue [on|off]"
|
||||||
echo
|
echo
|
||||||
|
echo "_cache.sh init [key] [value] (only sets value if not exists)"
|
||||||
echo "_cache.sh set [key] [value] [?expire-seconds]"
|
echo "_cache.sh set [key] [value] [?expire-seconds]"
|
||||||
echo "_cache.sh get [key1] [?key2] [?key3] ..."
|
echo "_cache.sh get [key1] [?key2] [?key3] ..."
|
||||||
echo
|
echo
|
||||||
@ -55,7 +56,7 @@ META_OUTDATED_SECONDS=":out"
|
|||||||
META_LASTTOUCH_TS=":ts"
|
META_LASTTOUCH_TS=":ts"
|
||||||
META_VALID_FLAG=":val"
|
META_VALID_FLAG=":val"
|
||||||
|
|
||||||
# path of the raspiblitz.info file (persiting cache values)
|
# path of the raspiblitz.info file (persisting cache values)
|
||||||
infoFile="/home/admin/raspiblitz.info"
|
infoFile="/home/admin/raspiblitz.info"
|
||||||
|
|
||||||
###################
|
###################
|
||||||
@ -133,34 +134,40 @@ elif [ "$1" = "keyvalue" ] && [ "$2" = "off" ]; then
|
|||||||
###################
|
###################
|
||||||
|
|
||||||
# set
|
# set
|
||||||
elif [ "$1" = "set" ]; then
|
elif [ "$1" = "set" ] || [ "$1" = "init" ]; then
|
||||||
|
|
||||||
# get parameters
|
# get parameters
|
||||||
keystr=$2
|
keystr=$2
|
||||||
valuestr=$3
|
valuestr=$3
|
||||||
expire=$4
|
expire=$4
|
||||||
|
|
||||||
# check that key & value are given
|
# check that key & value are provided
|
||||||
if [ "${keystr}" == "" ]; then
|
if [ "${keystr}" == "" ]; then
|
||||||
echo "# Fail: missing parameter"
|
echo "# Fail: missing parameter"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
NX=""
|
||||||
|
if [ "$1" = "init" ]; then
|
||||||
|
NX="NX "
|
||||||
|
fi
|
||||||
|
|
||||||
# filter from expire just numbers
|
# filter from expire just numbers
|
||||||
expire="${expire//[^0-9.]/}"
|
expire="${expire//[^0-9.]/}"
|
||||||
|
|
||||||
# add an expire flag if given
|
|
||||||
additionalParams=""
|
additionalParams=""
|
||||||
|
# add an expire flag if given
|
||||||
if [ "${expire}" != "" ]; then
|
if [ "${expire}" != "" ]; then
|
||||||
additionalParams="EX ${expire}"
|
additionalParams="EX ${expire}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set in redis key value cache
|
# set in redis key value cache
|
||||||
redis-cli set ${keystr} "${valuestr}" ${additionalParams} 1>/dev/null
|
redis-cli set ${NX} ${keystr} "${valuestr}" ${additionalParams} 1>/dev/null
|
||||||
|
|
||||||
# set in redis the timestamp
|
# set in redis the timestamp
|
||||||
timestamp=$(date +%s)
|
timestamp=$(date +%s)
|
||||||
redis-cli set ${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null
|
redis-cli set ${NX}${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null
|
||||||
#echo "# lasttouch(${timestamp})"
|
#echo "# lasttouch(${timestamp})"
|
||||||
|
|
||||||
# check if the value has a outdate policy
|
# check if the value has a outdate policy
|
||||||
@ -170,7 +177,7 @@ elif [ "$1" = "set" ]; then
|
|||||||
fi
|
fi
|
||||||
#echo "# outdatesecs(${outdatesecs})"
|
#echo "# outdatesecs(${outdatesecs})"
|
||||||
if [ "${outdatesecs}" != "-1" ]; then
|
if [ "${outdatesecs}" != "-1" ]; then
|
||||||
# set exipire valid flag (if its gone - value is considered as outdated)
|
# set expire valid flag (if its gone - value is considered as outdated)
|
||||||
redis-cli set ${keystr}${META_VALID_FLAG} "1" EX ${outdatesecs} 1>/dev/null
|
redis-cli set ${keystr}${META_VALID_FLAG} "1" EX ${outdatesecs} 1>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -243,7 +250,7 @@ elif [ "$1" = "export" ]; then
|
|||||||
# get parameter
|
# get parameter
|
||||||
keyfilter="${2}*"
|
keyfilter="${2}*"
|
||||||
|
|
||||||
# go thru all keys by keyfilter
|
# go through all keys by keyfilter
|
||||||
keylist=$(redis-cli KEYS "${keyfilter}")
|
keylist=$(redis-cli KEYS "${keyfilter}")
|
||||||
readarray -t arr <<< "${keylist}"
|
readarray -t arr <<< "${keylist}"
|
||||||
for key in "${arr[@]}";do
|
for key in "${arr[@]}";do
|
||||||
@ -266,7 +273,7 @@ elif [ "$1" = "export" ]; then
|
|||||||
|
|
||||||
##################################
|
##################################
|
||||||
# COUNT
|
# COUNT
|
||||||
# count value up
|
# increment value
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
# set
|
# set
|
||||||
@ -324,7 +331,7 @@ elif [ "$1" = "focus" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sanatize parameters (if not -1)
|
# sanitize parameters (if not -1)
|
||||||
outdatesecs="${outdatesecs//[^0-9.]/}"
|
outdatesecs="${outdatesecs//[^0-9.]/}"
|
||||||
|
|
||||||
# check that key & value are given
|
# check that key & value are given
|
||||||
@ -358,7 +365,7 @@ elif [ "$1" = "meta" ]; then
|
|||||||
keystr=$2
|
keystr=$2
|
||||||
default=$3
|
default=$3
|
||||||
|
|
||||||
# check that key & value are given
|
# check that key & value are provided
|
||||||
if [ "${keystr}" == "" ]; then
|
if [ "${keystr}" == "" ]; then
|
||||||
echo "# Fail: missing parameter"
|
echo "# Fail: missing parameter"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -55,6 +55,8 @@ fi
|
|||||||
# make sure for the rest of the setup info is set correctly
|
# make sure for the rest of the setup info is set correctly
|
||||||
/home/admin/config.scripts/blitz.conf.sh set network "bitcoin"
|
/home/admin/config.scripts/blitz.conf.sh set network "bitcoin"
|
||||||
/home/admin/config.scripts/blitz.conf.sh set chain "main"
|
/home/admin/config.scripts/blitz.conf.sh set chain "main"
|
||||||
|
echo "Provisioning ${network} Mainnet - run config script" >> ${logFile}
|
||||||
|
/home/admin/config.scripts/bitcoin.install.sh on mainnet >> ${logFile} 2>&1
|
||||||
|
|
||||||
# set Password B
|
# set Password B
|
||||||
echo "## SETTING PASSWORD B" >> ${logFile}
|
echo "## SETTING PASSWORD B" >> ${logFile}
|
||||||
|
@ -7,8 +7,8 @@ if [ "$EUID" -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# This script gets called from a fresh SD card
|
# This script gets called from a fresh SD card
|
||||||
# starting up that has an config file on HDD
|
# starting up that has a config file on HDD
|
||||||
# from old RaspiBlitz or manufacturer to
|
# from old RaspiBlitz or manufacturer
|
||||||
# to install and config services
|
# to install and config services
|
||||||
|
|
||||||
# LOGFILE - store debug logs of bootstrap
|
# LOGFILE - store debug logs of bootstrap
|
||||||
@ -72,7 +72,7 @@ if [ ${kbSizeRAM} -gt 3500000 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# zram on for all devices
|
# zram on for all devices
|
||||||
/home/admin/config.scripts/blitz.zram.sh on
|
/home/admin/config.scripts/blitz.zram.sh on >> ${logFile}
|
||||||
|
|
||||||
# link and copy HDD content into new OS on sd card
|
# link and copy HDD content into new OS on sd card
|
||||||
echo "Copy HDD content for user admin" >> ${logFile}
|
echo "Copy HDD content for user admin" >> ${logFile}
|
||||||
@ -399,15 +399,6 @@ else
|
|||||||
echo "Provisioning RTL CL - keep default" >> ${logFile}
|
echo "Provisioning RTL CL - keep default" >> ${logFile}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SPARKO
|
|
||||||
if [ "${sparko}" = "on" ]; then
|
|
||||||
echo "Provisioning Sparko - run config script" >> ${logFile}
|
|
||||||
/home/admin/_cache.sh set message "Setup SPARKO"
|
|
||||||
sudo -u admin /home/admin/config.scripts/cl-plugin.sparko.sh on mainnet >> ${logFile} 2>&1
|
|
||||||
else
|
|
||||||
echo "Provisioning Sparko - keep default" >> ${logFile}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# clHTTPplugin
|
# clHTTPplugin
|
||||||
if [ "${clHTTPplugin}" = "on" ]; then
|
if [ "${clHTTPplugin}" = "on" ]; then
|
||||||
echo "Provisioning clHTTPplugin - run config script" >> ${logFile}
|
echo "Provisioning clHTTPplugin - run config script" >> ${logFile}
|
||||||
@ -435,15 +426,6 @@ else
|
|||||||
echo "Provisioning clWatchtowerClient - keep default" >> ${logFile}
|
echo "Provisioning clWatchtowerClient - keep default" >> ${logFile}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SPARK
|
|
||||||
if [ "${spark}" = "on" ]; then
|
|
||||||
echo "Provisioning Spark Wallet - run config script" >> ${logFile}
|
|
||||||
/home/admin/_cache.sh set message "Setup SPARK WALLET"
|
|
||||||
sudo -u admin /home/admin/config.scripts/cl.spark.sh on mainnet >> ${logFile} 2>&1
|
|
||||||
else
|
|
||||||
echo "Provisioning Spark Wallet - keep default" >> ${logFile}
|
|
||||||
fi
|
|
||||||
|
|
||||||
#LOOP - install only if LiT won't be installed
|
#LOOP - install only if LiT won't be installed
|
||||||
if [ "${loop}" = "on" ] && [ "${lit}" != "on" ]; then
|
if [ "${loop}" = "on" ] && [ "${lit}" != "on" ]; then
|
||||||
echo "Provisioning Lightning Loop - run config script" >> ${logFile}
|
echo "Provisioning Lightning Loop - run config script" >> ${logFile}
|
||||||
@ -839,7 +821,7 @@ if [ -d "/var/cache/raspiblitz/tls_backup" ]; then
|
|||||||
cp /var/cache/raspiblitz/tls_backup/tls.cert /mnt/hdd/lnd/tls.cert >> ${logFile} 2>&1
|
cp /var/cache/raspiblitz/tls_backup/tls.cert /mnt/hdd/lnd/tls.cert >> ${logFile} 2>&1
|
||||||
cp /var/cache/raspiblitz/tls_backup/tls.key /mnt/hdd/lnd/tls.key >> ${logFile} 2>&1
|
cp /var/cache/raspiblitz/tls_backup/tls.key /mnt/hdd/lnd/tls.key >> ${logFile} 2>&1
|
||||||
chown -R bitcoin:bitcoin /mnt/hdd/lnd >> ${logFile} 2>&1
|
chown -R bitcoin:bitcoin /mnt/hdd/lnd >> ${logFile} 2>&1
|
||||||
echo "On next final restart admin creds will be updated by _boostrap.sh" >> ${logFile}
|
echo "On next final restart admin creds will be updated by _bootstrap.sh" >> ${logFile}
|
||||||
|
|
||||||
echo "DONE" >> ${logFile}
|
echo "DONE" >> ${logFile}
|
||||||
else
|
else
|
||||||
@ -903,6 +885,7 @@ echo "Make sure main services are running .." >> ${logFile}
|
|||||||
systemctl start ${network}d
|
systemctl start ${network}d
|
||||||
if [ "${lightning}" == "lnd" ];then
|
if [ "${lightning}" == "lnd" ];then
|
||||||
systemctl start lnd
|
systemctl start lnd
|
||||||
|
sleep 10
|
||||||
# set password c if given in flag from migration prep
|
# set password c if given in flag from migration prep
|
||||||
passwordFlagExists=$(ls /mnt/hdd/passwordc.flag | grep -c "passwordc.flag")
|
passwordFlagExists=$(ls /mnt/hdd/passwordc.flag | grep -c "passwordc.flag")
|
||||||
if [ "${passwordFlagExists}" == "1" ]; then
|
if [ "${passwordFlagExists}" == "1" ]; then
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1')
|
# RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1')
|
||||||
codeVersion="1.10.0rc3"
|
codeVersion="1.10.0rc4"
|
||||||
# keep last line with comment
|
# keep last line with comment
|
@ -1577,9 +1577,9 @@ if [ "$1" = "swap" ]; then
|
|||||||
sed -i "s/^CONF_SWAPFILE=.*/CONF_SWAPFILE=\/mnt\/hdd\/swapfile/g" /etc/dphys-swapfile
|
sed -i "s/^CONF_SWAPFILE=.*/CONF_SWAPFILE=\/mnt\/hdd\/swapfile/g" /etc/dphys-swapfile
|
||||||
fi
|
fi
|
||||||
sed -i "s/^CONF_SWAPSIZE=/#CONF_SWAPSIZE=/g" /etc/dphys-swapfile
|
sed -i "s/^CONF_SWAPSIZE=/#CONF_SWAPSIZE=/g" /etc/dphys-swapfile
|
||||||
sed -i "s/^#CONF_MAXSWAP=.*/CONF_MAXSWAP=3072/g" /etc/dphys-swapfile
|
sed -i "s/^#CONF_MAXSWAP=.*/CONF_MAXSWAP=10240/g" /etc/dphys-swapfile
|
||||||
>&2 echo "# Creating SWAP file .."
|
>&2 echo "# Creating SWAP file .."
|
||||||
dd if=/dev/zero of=$externalSwapPath count=3072 bs=1MiB 1>/dev/null
|
dd if=/dev/zero of=$externalSwapPath count=10240 bs=1MiB 1>/dev/null
|
||||||
chmod 0600 $externalSwapPath 1>/dev/null
|
chmod 0600 $externalSwapPath 1>/dev/null
|
||||||
>&2 echo "# Activating new SWAP"
|
>&2 echo "# Activating new SWAP"
|
||||||
mkswap $externalSwapPath
|
mkswap $externalSwapPath
|
||||||
|
@ -446,6 +446,11 @@ echo "*** NETWORK ***"
|
|||||||
sudo /home/admin/config.scripts/internet.sh status | grep 'network_device\|localip\|dhcp'
|
sudo /home/admin/config.scripts/internet.sh status | grep 'network_device\|localip\|dhcp'
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "*** ZRAM ***"
|
||||||
|
sudo /home/admin/config.scripts/blitz.zram.sh status
|
||||||
|
echo
|
||||||
|
|
||||||
echo "*** HARDWARE TEST RESULTS ***"
|
echo "*** HARDWARE TEST RESULTS ***"
|
||||||
source <(/home/admin/_cache.sh get system_count_undervoltage)
|
source <(/home/admin/_cache.sh get system_count_undervoltage)
|
||||||
showImproveInfo=0
|
showImproveInfo=0
|
||||||
|
@ -37,7 +37,7 @@ elif [ "$1" = "http-on" ]; then
|
|||||||
|
|
||||||
# install
|
# install
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y nginx apache2-utils
|
sudo apt-get install -y nginx-full apache2-utils
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "error='nginx install failed'"
|
echo "error='nginx install failed'"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -3,36 +3,72 @@
|
|||||||
# using https://github.com/foundObjects/zram-swap
|
# using https://github.com/foundObjects/zram-swap
|
||||||
VERSION="205ea1ec5b169f566e5e98ead794e9daf90cf245"
|
VERSION="205ea1ec5b169f566e5e98ead794e9daf90cf245"
|
||||||
|
|
||||||
|
if [ "$1" = status ]; then
|
||||||
|
|
||||||
|
# check if file /home/admin/download/zram-swap/install.sh exists
|
||||||
|
#echo "# https://github.com/foundObjects/zram-swap"
|
||||||
|
if [ -f /home/admin/download/zram-swap/install.sh ]; then
|
||||||
|
echo "downloaded=1"
|
||||||
|
else
|
||||||
|
echo "downloaded=0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check if service zram-swap is loaded/active
|
||||||
|
#echo "# sudo systemctl status zram-swap"
|
||||||
|
serviceLoaded=$(sudo systemctl status zram-swap 2>/dev/null | grep -c loaded)
|
||||||
|
if [ ${serviceLoaded} -gt 0 ]; then
|
||||||
|
echo "serviceLoaded=1"
|
||||||
|
else
|
||||||
|
echo "serviceLoaded=0"
|
||||||
|
fi
|
||||||
|
serviceActive=$(sudo systemctl status zram-swap 2>/dev/null | grep -c active)
|
||||||
|
if [ ${serviceActive} -gt 0 ]; then
|
||||||
|
echo "serviceActive=1"
|
||||||
|
else
|
||||||
|
echo "serviceActive=0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "config script to install ZRAM"
|
echo "config script to install ZRAM"
|
||||||
echo "blitz.zram.sh [on|off]"
|
echo "blitz.zram.sh [on|off|status]"
|
||||||
echo "using https://github.com/foundObjects/zram-swap"
|
echo "using https://github.com/foundObjects/zram-swap"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "# mkdir /home/admin/download"
|
||||||
mkdir /home/admin/download 2>/dev/null
|
mkdir /home/admin/download 2>/dev/null
|
||||||
cd /home/admin/download || exit 1
|
cd /home/admin/download || exit 1
|
||||||
if [ ! -d zram-swap ]; then
|
if [ ! -d zram-swap ]; then
|
||||||
|
echo "# download script"
|
||||||
sudo -u admin git clone https://github.com/foundObjects/zram-swap.git
|
sudo -u admin git clone https://github.com/foundObjects/zram-swap.git
|
||||||
|
echo "# cd zram-swap"
|
||||||
cd zram-swap || exit 1
|
cd zram-swap || exit 1
|
||||||
git reset --hard $VERSION || exit 1
|
echo "# check version"
|
||||||
|
sudo -u admin git reset --hard $VERSION || exit 1
|
||||||
|
echo "# version OK"
|
||||||
else
|
else
|
||||||
|
echo "# script available"
|
||||||
cd zram-swap || exit 1
|
cd zram-swap || exit 1
|
||||||
|
echo "# directory OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = on ]; then
|
if [ "$1" = on ]; then
|
||||||
|
echo "# install zram-swap"
|
||||||
if [ $(sudo cat /proc/swaps | grep -c zram) -eq 0 ]; then
|
if [ $(sudo cat /proc/swaps | grep -c zram) -eq 0 ]; then
|
||||||
# install zram to 1/2 of RAM, activate and prioritize
|
# install zram to 1/2 of RAM, activate and prioritize
|
||||||
sudo /home/admin/download/zram-swap/install.sh
|
sudo /home/admin/download/zram-swap/install.sh
|
||||||
|
|
||||||
# make better use of zram
|
# make better use of zram
|
||||||
echo "\
|
echo "# RaspiBlitz Edit: blitz.zram.sh" | sudo tee -a /etc/sysctl.conf
|
||||||
vm.vfs_cache_pressure=500
|
echo "vm.vfs_cache_pressure=500" | sudo tee -a /etc/sysctl.conf
|
||||||
vm.swappiness=100
|
echo "vm.swappiness=100" | sudo tee -a /etc/sysctl.conf
|
||||||
vm.dirty_background_ratio=1
|
echo "vm.dirty_background_ratio=1" | sudo tee -a /etc/sysctl.conf
|
||||||
vm.dirty_ratio=50
|
echo "vm.dirty_ratio=50" | sudo tee -a /etc/sysctl.conf
|
||||||
" | sudo tee -a /etc/sysctl.conf
|
|
||||||
|
|
||||||
# apply
|
# apply
|
||||||
sudo sysctl --system
|
sudo sysctl --system
|
||||||
@ -47,6 +83,7 @@ vm.dirty_ratio=50
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = off ]; then
|
if [ "$1" = off ]; then
|
||||||
|
echo "# deinstall zram-swap"
|
||||||
sudo /home/admin/download/zram-swap/install.sh --uninstall
|
sudo /home/admin/download/zram-swap/install.sh --uninstall
|
||||||
sudo rm /etc/default/zram-swap
|
sudo rm /etc/default/zram-swap
|
||||||
sudo rm -rf /home/admin/download/zram-swap
|
sudo rm -rf /home/admin/download/zram-swap
|
||||||
|
@ -319,7 +319,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
# https://github.com/romanz/electrs/blob/master/doc/usage.md#configuration-files-and-environment-variables
|
# https://github.com/romanz/electrs/blob/master/doc/usage.md#configuration-files-and-environment-variables
|
||||||
sudo -u electrs mkdir /home/electrs/.electrs 2>/dev/null
|
sudo -u electrs mkdir /home/electrs/.electrs 2>/dev/null
|
||||||
echo "\
|
echo "\
|
||||||
log_filters = \"INFO\"
|
log_filters = \"WARN\"
|
||||||
timestamp = true
|
timestamp = true
|
||||||
jsonrpc_import = true
|
jsonrpc_import = true
|
||||||
index-batch-size = 10
|
index-batch-size = 10
|
||||||
@ -422,7 +422,6 @@ Type=simple
|
|||||||
TimeoutSec=60
|
TimeoutSec=60
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=60
|
RestartSec=60
|
||||||
LogLevelMax=5
|
|
||||||
|
|
||||||
# Hardening measures
|
# Hardening measures
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
|
@ -10,7 +10,7 @@ CONFIG_FILE=$APP_DATA_DIR/.env
|
|||||||
APP_ROOT_DIR=$HOME_DIR/kindle-display
|
APP_ROOT_DIR=$HOME_DIR/kindle-display
|
||||||
APP_SERVER_DIR=$APP_ROOT_DIR/server
|
APP_SERVER_DIR=$APP_ROOT_DIR/server
|
||||||
CRON_FILE=$APP_SERVER_DIR/cron.sh
|
CRON_FILE=$APP_SERVER_DIR/cron.sh
|
||||||
APP_VERSION=0.5.1
|
APP_VERSION=0.5.3
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://github.com/lnproxy/lnproxy/commits/main
|
# https://github.com/lnproxy/lnproxy/commits/main
|
||||||
LNPROXYVERSION="7c8a14106b42cfd89471c1dc02d7baab1122dfa2"
|
LNPROXYVERSION="c1031bbe507623f8f196ff83aa5ea504cca05143"
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
|
@ -2,20 +2,26 @@
|
|||||||
# https://github.com/ZmnSCPxj/clboss#operating
|
# https://github.com/ZmnSCPxj/clboss#operating
|
||||||
|
|
||||||
# https://github.com/ZmnSCPxj/clboss/releases
|
# https://github.com/ZmnSCPxj/clboss/releases
|
||||||
CLBOSSVERSION="0.13A"
|
# https://github.com/ZmnSCPxj/clboss/commits/master
|
||||||
|
CLBOSSVERSION="ef5c41612da0d544b0ed1f3e986b4b07126723a1"
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ];then
|
if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo
|
echo
|
||||||
echo "Install or remove the CLBOSS Core Lightning plugin"
|
echo "Install or remove the CLBOSS Core Lightning plugin"
|
||||||
echo "version: v${CLBOSSVERSION}"
|
echo "version: v${CLBOSSVERSION}"
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo "cl-plugin.clboss.sh [on|off] [testnet|mainnet|signet]"
|
echo "cl-plugin.clboss.sh [on|off] [mainnet|testnet] <latest>"
|
||||||
echo "cl-plugin.clboss.sh [info]"
|
echo "cl-plugin.clboss.sh info"
|
||||||
|
echo "cl-plugin.clboss.sh update"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $# -gt 2 ] && [ $3 = latest ]; then
|
||||||
|
CLBOSSVERSION=""
|
||||||
|
fi
|
||||||
|
|
||||||
# source <(/home/admin/config.scripts/network.aliases.sh getvars cl <mainnet|testnet|signet>)
|
# source <(/home/admin/config.scripts/network.aliases.sh getvars cl <mainnet|testnet|signet>)
|
||||||
source <(/home/admin/config.scripts/network.aliases.sh getvars cl $2)
|
source <(/home/admin/config.scripts/network.aliases.sh getvars cl $2)
|
||||||
|
|
||||||
@ -40,36 +46,40 @@ https://github.com/ZmnSCPxj/clboss#operating
|
|||||||
" 0 0
|
" 0 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function buildFromSource() {
|
||||||
if [ "$1" = on ];then
|
version=$1
|
||||||
|
|
||||||
if [ ! -f /home/bitcoin/cl-plugins-available/clboss-${CLBOSSVERSION}.tar.gz ];then
|
|
||||||
|
|
||||||
# download tarball
|
|
||||||
sudo -u bitcoin wget \
|
|
||||||
https://github.com/ZmnSCPxj/clboss/releases/download/${CLBOSSVERSION}/clboss-${CLBOSSVERSION}.tar.gz \
|
|
||||||
-O /home/bitcoin/cl-plugins-available/clboss-${CLBOSSVERSION}.tar.gz || exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f /home/bitcoin/cl-plugins-available/clboss-${CLBOSSVERSION}/clboss ];then
|
|
||||||
# dependencies
|
# dependencies
|
||||||
sudo apt install -y build-essential pkg-config libev-dev \
|
sudo apt install -y build-essential pkg-config libev-dev \
|
||||||
libcurl4-gnutls-dev libsqlite3-dev dnsutils
|
libcurl4-gnutls-dev libsqlite3-dev dnsutils
|
||||||
|
sudo apt install -y git automake autoconf-archive libtool
|
||||||
|
|
||||||
# install
|
# download
|
||||||
cd /home/bitcoin/cl-plugins-available/ || exit 1
|
cd /home/bitcoin/cl-plugins-available/ || exit 1
|
||||||
sudo -u bitcoin tar -xvf clboss-${CLBOSSVERSION}.tar.gz
|
sudo -u bitcoin git clone https://github.com/ZmnSCPxj/clboss
|
||||||
cd clboss-${CLBOSSVERSION} || exit 1
|
cd clboss || exit 1
|
||||||
sudo -u bitcoin ./configure && sudo -u bitcoin make
|
if [[ -v version && -n "$version" ]]; then
|
||||||
# sudo make install # installs to /usr/local/bin/clboss
|
sudo -u bitcoin git reset --hard ${version}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# symlink to enable
|
# build
|
||||||
if [ ! -L /home/bitcoin/${netprefix}cl-plugins-enabled/clboss ];then
|
sudo -u bitcoin autoreconf -i
|
||||||
sudo ln -s /home/bitcoin/cl-plugins-available/clboss-${CLBOSSVERSION}/clboss \
|
sudo -u bitcoin ./configure && sudo -u bitcoin make
|
||||||
/home/bitcoin/${netprefix}cl-plugins-enabled
|
# sudo make install # optional - installs to /usr/local/bin/clboss
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$1" = on ]; then
|
||||||
|
|
||||||
|
if [ ! -f /home/bitcoin/cl-plugins-available/clboss/clboss ]; then
|
||||||
|
|
||||||
|
buildFromSource ${CLBOSSVERSION}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# refresh symlink to enable
|
||||||
|
sudo rm /home/bitcoin/${netprefix}cl-plugins-enabled/clboss 2>/dev/null
|
||||||
|
sudo ln -s /home/bitcoin/cl-plugins-available/clboss/clboss \
|
||||||
|
/home/bitcoin/${netprefix}cl-plugins-enabled/
|
||||||
|
|
||||||
# setting value in raspiblitz.conf
|
# setting value in raspiblitz.conf
|
||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}clboss "on"
|
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}clboss "on"
|
||||||
|
|
||||||
@ -85,17 +95,18 @@ if [ "$1" = on ];then
|
|||||||
echo "${netprefix}cl clboss-status"
|
echo "${netprefix}cl clboss-status"
|
||||||
echo "https://github.com/ZmnSCPxj/clboss#operating"
|
echo "https://github.com/ZmnSCPxj/clboss#operating"
|
||||||
|
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = off ];then
|
if [ "$1" = off ]; then
|
||||||
# delete symlink
|
# delete symlink
|
||||||
sudo rm -rf /home/bitcoin/${netprefix}cl-plugins-enabled/clboss
|
sudo rm -rf /home/bitcoin/${netprefix}cl-plugins-enabled/clboss
|
||||||
|
|
||||||
echo "# Restart the ${netprefix}lightningd.service to deactivate clboss"
|
echo "# Restarting the ${netprefix}lightningd.service to deactivate clboss"
|
||||||
sudo systemctl restart ${netprefix}lightningd
|
sudo systemctl restart ${netprefix}lightningd
|
||||||
|
|
||||||
# purge
|
# purge
|
||||||
if [ "$(echo "$@" | grep -c purge)" -gt 0 ];then
|
if [ "$(echo "$@" | grep -c purge)" -gt 0 ]; then
|
||||||
echo "# Delete plugin"
|
echo "# Delete plugin"
|
||||||
sudo rm -rf /home/bitcoin/cl-plugins-available/clboss*
|
sudo rm -rf /home/bitcoin/cl-plugins-available/clboss*
|
||||||
sudo rm -f /usr/local/bin/clboss
|
sudo rm -f /usr/local/bin/clboss
|
||||||
@ -105,4 +116,25 @@ if [ "$1" = off ];then
|
|||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}clboss "off"
|
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}clboss "off"
|
||||||
echo "# clboss was uninstalled for $CHAIN"
|
echo "# clboss was uninstalled for $CHAIN"
|
||||||
|
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = update ]; then
|
||||||
|
if [ ! -f /home/bitcoin/cl-plugins-available/clboss/clboss ]; then
|
||||||
|
/home/admin/config.scrips/cl-plugin/clboss.sh on "${CHAIN}"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
sudo rm -rf /home/bitcoin/cl-plugins-available/clboss
|
||||||
|
|
||||||
|
buildFromSource
|
||||||
|
|
||||||
|
echo "# clboss was updated to the latest master commit"
|
||||||
|
echo "# Restarting ${netprefix}lightningd to activate"
|
||||||
|
sudo systemctl restart ${netprefix}lightningd
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "# FAIL - Unknown Parameter $1"
|
||||||
|
exit 1
|
||||||
|
@ -1,205 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# explanation on paths https://github.com/ElementsProject/lightning/issues/4223
|
|
||||||
# built-in path dir: /usr/local/libexec/c-lightning/plugins/
|
|
||||||
# added --plugin-dir=/home/bitcoin/${netprefix}cl-plugins-enabled
|
|
||||||
|
|
||||||
SPARKOVERSION="v2.8"
|
|
||||||
|
|
||||||
# command info
|
|
||||||
if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ];then
|
|
||||||
echo
|
|
||||||
echo "Install, remove, connect or get info about the Sparko plugin for Core Lightning"
|
|
||||||
echo "version: $SPARKOVERSION"
|
|
||||||
echo "Usage:"
|
|
||||||
echo "cl-plugin.sparko.sh [on|off|menu|connect] [testnet|mainnet|signet] [norestart]"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# source <(/home/admin/config.scripts/network.aliases.sh getvars cl <mainnet|testnet|signet>)
|
|
||||||
source <(/home/admin/config.scripts/network.aliases.sh getvars cl $2)
|
|
||||||
|
|
||||||
# show info menu
|
|
||||||
if [ "$1" = "menu" ]; then
|
|
||||||
|
|
||||||
# get network info
|
|
||||||
localip=$(hostname -I | awk '{print $1}')
|
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/${netprefix}sparko/hostname)
|
|
||||||
toraddresstext="Hidden Service address for the Tor Browser (QRcode on LCD):\n$toraddress"
|
|
||||||
if [ ${#toraddress} -eq 0 ];then
|
|
||||||
toraddresstext="Activate Tor to access the web interface from outside of the local network."
|
|
||||||
else
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh qr "${toraddress}"
|
|
||||||
fi
|
|
||||||
fingerprint=$(openssl x509 -in /home/bitcoin/.lightning/sparko-tls/cert.pem -fingerprint -noout | cut -d"=" -f2)
|
|
||||||
|
|
||||||
whiptail --title "\
|
|
||||||
Sparko - $CHAIN" --msgbox "Open in your local web browser:
|
|
||||||
https://${localip}:${portprefix}9000\n
|
|
||||||
username: blitz
|
|
||||||
password: 'your Password B'\n
|
|
||||||
Accept the self-signed SSL certificate with the fingerprint:
|
|
||||||
${fingerprint}\n
|
|
||||||
${toraddresstext}
|
|
||||||
" 17 67
|
|
||||||
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
|
||||||
|
|
||||||
echo "# please wait ..."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $1 = connect ];then
|
|
||||||
localip=$(hostname -I | awk '{print $1}')
|
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/${netprefix}sparko/hostname)
|
|
||||||
accesskey=$(sudo cat ${CLCONF} | grep "^sparko-keys=" | cut -d= -f2 | cut -d';' -f1)
|
|
||||||
url="https://${localip}:${portprefix}9000/"
|
|
||||||
#string="${url}?access-key=${accesskey}"
|
|
||||||
#sudo /home/admin/config.scripts/blitz.display.sh qr "$string"
|
|
||||||
#clear
|
|
||||||
#echo "connection string (shown as a QRcode on the top and on the LCD):"
|
|
||||||
#echo "$string"
|
|
||||||
#qrencode -t ANSIUTF8 "${string}"
|
|
||||||
clear
|
|
||||||
echo
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh qr "${toraddress}"
|
|
||||||
echo "The Tor address is shown as a QRcode below and on the LCD"
|
|
||||||
echo "Scan it to your phone with a QR scanner app and paste it to: 'Host'"
|
|
||||||
echo
|
|
||||||
echo "Host: ${toraddress}"
|
|
||||||
echo
|
|
||||||
qrencode -t ANSIUTF8 "${toraddress}"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "Alternatively to connect through the LAN the address is:"
|
|
||||||
echo "${url}"
|
|
||||||
echo
|
|
||||||
echo "# Press enter to continue to show the access key"
|
|
||||||
read key
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh qr "${accesskey}"
|
|
||||||
clear
|
|
||||||
echo
|
|
||||||
echo "The Access Key is shown as a QRcode below and on the LCD"
|
|
||||||
echo "Scan it to your phone with a QR scanner app and paste it to: 'Access Key'"
|
|
||||||
echo
|
|
||||||
echo "Acces Key: ${accesskey}"
|
|
||||||
echo
|
|
||||||
qrencode -t ANSIUTF8 "${accesskey}"
|
|
||||||
echo
|
|
||||||
echo "# Press enter to hide the QRcode from the LCD"
|
|
||||||
read key
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "on" ];then
|
|
||||||
echo "# Detect CPU architecture ..."
|
|
||||||
isARM=$(uname -m | grep -c 'arm')
|
|
||||||
isAARCH64=$(uname -m | grep -c 'aarch64')
|
|
||||||
isX86_64=$(uname -m | grep -c 'x86_64')
|
|
||||||
|
|
||||||
if [ ${isARM} -eq 1 ] ; then
|
|
||||||
DISTRO="linux-arm"
|
|
||||||
elif [ ${isAARCH64} -eq 1 ] ; then
|
|
||||||
DISTRO="linux_arm"
|
|
||||||
elif [ ${isX86_64} -eq 1 ] ; then
|
|
||||||
DISTRO="linux_amd64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f /home/bitcoin/cl-plugins-available/sparko ];then
|
|
||||||
sudo -u bitcoin mkdir /home/bitcoin/cl-plugins-available
|
|
||||||
# download binary
|
|
||||||
sudo -u bitcoin wget https://github.com/fiatjaf/sparko/releases/download/${SPARKOVERSION}/sparko_${DISTRO}\
|
|
||||||
-O /home/bitcoin/cl-plugins-available/sparko || exit 1
|
|
||||||
# make executable
|
|
||||||
sudo chmod +x /home/bitcoin/cl-plugins-available/sparko
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -L /home/bitcoin/${netprefix}cl-plugins-enabled/sparko ];then
|
|
||||||
sudo ln -s /home/bitcoin/cl-plugins-available/sparko \
|
|
||||||
/home/bitcoin/${netprefix}cl-plugins-enabled
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f /home/bitcoin/.lightning/sparko-tls/key.pem ];then
|
|
||||||
# create a self signed cert https://github.com/fiatjaf/sparko#how-to-use
|
|
||||||
/home/admin/config.scripts/internet.selfsignedcert.sh
|
|
||||||
# sparko looks for specific filenames
|
|
||||||
sudo -u bitcoin mkdir /home/bitcoin/.lightning/sparko-tls
|
|
||||||
sudo ln -sf /mnt/hdd/app-data/selfsignedcert/selfsigned.key \
|
|
||||||
/home/bitcoin/.lightning/sparko-tls/key.pem
|
|
||||||
sudo ln -sf /mnt/hdd/app-data/selfsignedcert/selfsigned.cert \
|
|
||||||
/home/bitcoin/.lightning/sparko-tls/cert.pem
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########
|
|
||||||
# Config #
|
|
||||||
##########
|
|
||||||
if ! grep -Eq "^sparko" ${CLCONF};then
|
|
||||||
echo "# Editing ${CLCONF}"
|
|
||||||
echo "# See: https://github.com/fiatjaf/sparko#how-to-use"
|
|
||||||
PASSWORD_B=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-)
|
|
||||||
# Spark wallet only allows alphanumeric characters
|
|
||||||
masterkeythatcandoeverything=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c20)
|
|
||||||
secretaccesskeythatcanreadstuff=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c20)
|
|
||||||
verysecretkeythatcanpayinvoices=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c20)
|
|
||||||
keythatcanlistentoallevents=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c20)
|
|
||||||
echo "
|
|
||||||
sparko-host=0.0.0.0
|
|
||||||
sparko-port=${portprefix}9000
|
|
||||||
sparko-tls-path=/home/bitcoin/.lightning/sparko-tls
|
|
||||||
sparko-login=blitz:$PASSWORD_B
|
|
||||||
sparko-keys=${masterkeythatcandoeverything}; ${secretaccesskeythatcanreadstuff}: getinfo, listchannels, listnodes; ${verysecretkeythatcanpayinvoices}: pay; ${keythatcanlistentoallevents}: stream
|
|
||||||
" | sudo tee -a ${CLCONF}
|
|
||||||
else
|
|
||||||
echo "# Sparko is already configured in ${CLCONF}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "# Allowing port ${portprefix}9000 through the firewall"
|
|
||||||
sudo ufw allow "${portprefix}9000" comment "${netprefix}sparko"
|
|
||||||
|
|
||||||
# hidden service to https://xx.onion
|
|
||||||
/home/admin/config.scripts/tor.onion-service.sh ${netprefix}sparko 443 ${portprefix}9000
|
|
||||||
|
|
||||||
# setting value in raspi blitz config
|
|
||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}sparko "on"
|
|
||||||
|
|
||||||
source <(/home/admin/_cache.sh get state)
|
|
||||||
if [ "${state}" == "ready" ] && [ "$3" != "norestart" ]; then
|
|
||||||
echo "# Restart the ${netprefix}lightningd.service to activate Sparko"
|
|
||||||
sudo systemctl restart ${netprefix}lightningd
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "# Sparko was installed"
|
|
||||||
echo "# Monitor with:"
|
|
||||||
echo "sudo journalctl | grep sparko | tail -n5"
|
|
||||||
echo "sudo tail -n 100 -f /home/bitcoin/.lightning/${CLNETWORK}/cl.log | grep sparko"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "off" ];then
|
|
||||||
# delete symlink
|
|
||||||
sudo rm -rf /home/bitcoin/${netprefix}cl-plugins-enabled/sparko
|
|
||||||
|
|
||||||
echo "# Editing ${CLCONF}"
|
|
||||||
sudo sed -i "/^sparko/d" ${CLCONF}
|
|
||||||
|
|
||||||
echo "# Restart the ${netprefix}lightningd.service to deactivate Sparko"
|
|
||||||
sudo systemctl restart ${netprefix}lightningd
|
|
||||||
|
|
||||||
echo "# Deny port ${portprefix}9000 through the firewall"
|
|
||||||
sudo ufw deny "${portprefix}9000"
|
|
||||||
|
|
||||||
/home/admin/config.scripts/tor.onion-service.sh off ${netprefix}sparko
|
|
||||||
|
|
||||||
# purge
|
|
||||||
if [ "$(echo "$@" | grep -c purge)" -gt 0 ];then
|
|
||||||
echo "# Delete plugin"
|
|
||||||
sudo rm -rf /home/bitcoin/cl-plugins-available/sparko
|
|
||||||
fi
|
|
||||||
# setting value in raspi blitz config
|
|
||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}sparko "off"
|
|
||||||
echo "# Sparko was uninstalled"
|
|
||||||
|
|
||||||
fi
|
|
@ -34,15 +34,6 @@ if [ "$1" == "prestart" ]; then
|
|||||||
sed -i "/^announce-addr=127.0.0.1/d" ${CLCONF}
|
sed -i "/^announce-addr=127.0.0.1/d" ${CLCONF}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(grep -c "^sparko" < ${CLCONF}) -gt 0 ];then
|
|
||||||
if [ ! -f /home/bitcoin/${netprefix}cl-plugins-enabled/sparko ]\
|
|
||||||
|| [ "$(eval echo \$${netprefix}sparko)" != "on" ]; then
|
|
||||||
echo "# The Sparko plugin is not present but in config"
|
|
||||||
sed -i "/^sparko/d" ${CLCONF}
|
|
||||||
rm -rf /home/bitcoin/${netprefix}cl-plugins-enabled/sparko
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(grep -c "^clboss" < ${CLCONF}) -gt 0 ];then
|
if [ $(grep -c "^clboss" < ${CLCONF}) -gt 0 ];then
|
||||||
if [ ! -f /home/bitcoin/${netprefix}cl-plugins-enabled/clboss ]\
|
if [ ! -f /home/bitcoin/${netprefix}cl-plugins-enabled/clboss ]\
|
||||||
|| [ "$(eval echo \$${netprefix}clboss)" != "on" ]; then
|
|| [ "$(eval echo \$${netprefix}clboss)" != "on" ]; then
|
||||||
|
@ -13,13 +13,6 @@ fi
|
|||||||
# source <(/home/admin/config.scripts/network.aliases.sh getvars cl <mainnet|testnet|signet>)
|
# source <(/home/admin/config.scripts/network.aliases.sh getvars cl <mainnet|testnet|signet>)
|
||||||
source <(/home/admin/config.scripts/network.aliases.sh getvars cl $1)
|
source <(/home/admin/config.scripts/network.aliases.sh getvars cl $1)
|
||||||
|
|
||||||
if [ $(sudo -u bitcoin cat ${CLCONF} | grep -c "^sparko") -gt 0 ];then
|
|
||||||
if [ ! -f /home/bitcoin/${netprefix}cl-plugins-enabled/sparko ];then
|
|
||||||
echo "# The Sparko plugin is not present but in config"
|
|
||||||
/home/admin/config.scripts/cl-plugin.sparko.sh on $CHAIN norestart
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(sudo -u bitcoin cat ${CLCONF} | grep -c "^http-pass") -gt 0 ];then
|
if [ $(sudo -u bitcoin cat ${CLCONF} | grep -c "^http-pass") -gt 0 ];then
|
||||||
if [ ! -f /home/bitcoin/cl-plugins-enabled/c-lightning-http-plugin ]; then
|
if [ ! -f /home/bitcoin/cl-plugins-enabled/c-lightning-http-plugin ]; then
|
||||||
echo "# The clHTTPplugin is not present but in config"
|
echo "# The clHTTPplugin is not present but in config"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# https://lightning.readthedocs.io/
|
# https://lightning.readthedocs.io/
|
||||||
|
|
||||||
# https://github.com/ElementsProject/lightning/releases
|
# https://github.com/ElementsProject/lightning/releases
|
||||||
CLVERSION="v23.05.2"
|
CLVERSION="v23.08"
|
||||||
|
|
||||||
# install the latest master by using the last commit id
|
# install the latest master by using the last commit id
|
||||||
# https://github.com/ElementsProject/lightning/commit/master
|
# https://github.com/ElementsProject/lightning/commit/master
|
||||||
@ -58,7 +58,7 @@ function installDependencies() {
|
|||||||
function buildAndInstallCLbinaries() {
|
function buildAndInstallCLbinaries() {
|
||||||
echo "- Configuring EXPERIMENTAL_FEATURES enabled"
|
echo "- Configuring EXPERIMENTAL_FEATURES enabled"
|
||||||
echo
|
echo
|
||||||
sudo -u bitcoin ./configure --enable-experimental-features
|
sudo -u bitcoin ./configure
|
||||||
echo
|
echo
|
||||||
echo "- Building Core lightning from source"
|
echo "- Building Core lightning from source"
|
||||||
echo
|
echo
|
||||||
@ -367,9 +367,6 @@ alias ${netprefix}clconf=\"sudo nano ${CLCONF}\"
|
|||||||
# setting values in the raspiblitz.conf
|
# setting values in the raspiblitz.conf
|
||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}cl on
|
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}cl on
|
||||||
# blitz.conf.sh needs sudo access - cannot be run in cl.check.sh
|
# blitz.conf.sh needs sudo access - cannot be run in cl.check.sh
|
||||||
if [ ! -f /home/bitcoin/${netprefix}cl-plugins-enabled/sparko ]; then
|
|
||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}sparko "off"
|
|
||||||
fi
|
|
||||||
if [ ! -f /home/bitcoin/cl-plugins-enabled/c-lightning-http-plugin ]; then
|
if [ ! -f /home/bitcoin/cl-plugins-enabled/c-lightning-http-plugin ]; then
|
||||||
/home/admin/config.scripts/blitz.conf.sh set clHTTPplugin "off"
|
/home/admin/config.scripts/blitz.conf.sh set clHTTPplugin "off"
|
||||||
fi
|
fi
|
||||||
|
@ -1,173 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#https://github.com/shesek/spark-wallet/releases
|
|
||||||
SPARKVERSION="v0.3.1"
|
|
||||||
|
|
||||||
# command info
|
|
||||||
if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ];then
|
|
||||||
echo
|
|
||||||
echo "Install, remove or get info about the Spark Wallet for Core Lightning"
|
|
||||||
echo "version: $SPARKVERSION"
|
|
||||||
echo "Usage:"
|
|
||||||
echo "cl.spark.sh [on|off|menu] <testnet|mainnet|signet> "
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# source <(/home/admin/config.scripts/network.aliases.sh getvars cl <mainnet|testnet|signet>)
|
|
||||||
source <(/home/admin/config.scripts/network.aliases.sh getvars cl $2)
|
|
||||||
systemdService="${netprefix}spark"
|
|
||||||
|
|
||||||
# show info menu
|
|
||||||
if [ "$1" = "menu" ]; then
|
|
||||||
|
|
||||||
# get network info
|
|
||||||
localip=$(hostname -I | awk '{print $1}')
|
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/${netprefix}spark-wallet/hostname)
|
|
||||||
toraddresstext="Hidden Service address for the Tor Browser (QRcode on LCD):\n$toraddress"
|
|
||||||
if [ ${#toraddress} -eq 0 ];then
|
|
||||||
toraddresstext="Activate Tor to access the web interface from outside of the local network."
|
|
||||||
else
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh qr "${toraddress}"
|
|
||||||
fi
|
|
||||||
fingerprint=$(openssl x509 -in /home/bitcoin/.spark-wallet/tls/cert.pem -fingerprint -noout | cut -d"=" -f2)
|
|
||||||
|
|
||||||
whiptail --title "\
|
|
||||||
spark - $CHAIN" --msgbox "Open in your local web browser:
|
|
||||||
https://${localip}:${portprefix}8000\n
|
|
||||||
username: blitz
|
|
||||||
password: 'your Password B'\n
|
|
||||||
Accept the self-signed SSL certificate with the fingerprint:
|
|
||||||
${fingerprint}\n
|
|
||||||
${toraddresstext}
|
|
||||||
" 17 67
|
|
||||||
|
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
|
||||||
|
|
||||||
echo "# please wait ..."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $1 = on ];then
|
|
||||||
|
|
||||||
# check and install NodeJS
|
|
||||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
|
||||||
|
|
||||||
# set up npm-global
|
|
||||||
sudo -u bitcoin mkdir /home/bitcoin/.npm-global
|
|
||||||
sudo -u bitcoin npm config set prefix '/home/bitcoin/.npm-global'
|
|
||||||
sudo bash -c "echo 'PATH=$PATH:/home/bitcoin/.npm-global/bin' >> /home/bitcoin/.bashrc"
|
|
||||||
|
|
||||||
echo "# Create data folder on the disk"
|
|
||||||
echo "# make sure the data directory exists"
|
|
||||||
sudo mkdir -p /mnt/hdd/app-data/.spark-wallet
|
|
||||||
echo "# symlink"
|
|
||||||
sudo rm -rf /home/bitcoin/.spark-wallet # not a symlink.. delete it silently
|
|
||||||
sudo ln -s /mnt/hdd/app-data/.spark-wallet/ /home/bitcoin/.spark-wallet
|
|
||||||
sudo chown bitcoin:bitcoin -R /mnt/hdd/app-data/.spark-wallet
|
|
||||||
|
|
||||||
cd /home/bitcoin || exit 1
|
|
||||||
sudo -u bitcoin git clone https://github.com/shesek/spark-wallet
|
|
||||||
cd spark-wallet || exit 1
|
|
||||||
sudo -u bitcoin git reset --hard ${SPARKVERSION} || exit 1
|
|
||||||
sudo -u bitcoin npm install @babel/cli
|
|
||||||
sudo -u bitcoin npm run dist:npm || exit 1
|
|
||||||
|
|
||||||
if [ ! -f /home/bitcoin/.spark-wallet/tls/key.pem ];then
|
|
||||||
echo "# creating /home/bitcoin/.spark-wallet/tls/key.pem"
|
|
||||||
# create a self signed cert https://github.com/fiatjaf/spark#how-to-use
|
|
||||||
/home/admin/config.scripts/internet.selfsignedcert.sh
|
|
||||||
# spark looks for specific filenames
|
|
||||||
sudo -u bitcoin mkdir -p /home/bitcoin/.spark-wallet/tls/
|
|
||||||
sudo ln -sf /mnt/hdd/app-data/selfsignedcert/selfsigned.key \
|
|
||||||
/home/bitcoin/.spark-wallet/tls/key.pem
|
|
||||||
sudo ln -sf /mnt/hdd/app-data/selfsignedcert/selfsigned.cert \
|
|
||||||
/home/bitcoin/.spark-wallet/tls/cert.pem
|
|
||||||
else
|
|
||||||
echo "# exists /home/bitcoin/.spark-wallet/tls/key.pem"
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########
|
|
||||||
# Config #
|
|
||||||
##########
|
|
||||||
if [ -f /home/bitcoin/.spark-wallet/${netprefix}config ];then
|
|
||||||
echo "# ${netprefix}spark config is already present"
|
|
||||||
else
|
|
||||||
PASSWORD_B=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-)
|
|
||||||
echo "\
|
|
||||||
login=blitz:${PASSWORD_B}
|
|
||||||
host=0.0.0.0
|
|
||||||
proxy=socks5h://127.0.0.1:9050
|
|
||||||
tls-path=/home/bitcoin/.lightning/spark-tls
|
|
||||||
onion
|
|
||||||
" | sudo -u bitcoin tee /home/bitcoin/.spark-wallet/${netprefix}config
|
|
||||||
fi
|
|
||||||
|
|
||||||
#################
|
|
||||||
# SYSTEMD SERVICE
|
|
||||||
#################
|
|
||||||
# https://raw.githubusercontent.com/shesek/spark-wallet/master/scripts/spark-wallet.service
|
|
||||||
echo "# Create Systemd Service: ${systemdService}.service"
|
|
||||||
echo "
|
|
||||||
# Systemd unit for ${systemdService}
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=${systemdService} Lightning Wallet
|
|
||||||
Wants=${netprefix}lightningd.service
|
|
||||||
After=${netprefix}lightningd.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
WorkingDirectory=/home/bitcoin/spark-wallet
|
|
||||||
ExecStart=/home/bitcoin/spark-wallet/dist/cli.js\
|
|
||||||
--ln-path /home/bitcoin/.lightning/${CLNETWORK} --port 8000\
|
|
||||||
--config /home/bitcoin/.spark-wallet/config
|
|
||||||
User=bitcoin
|
|
||||||
Restart=on-failure
|
|
||||||
TimeoutSec=120
|
|
||||||
RestartSec=30
|
|
||||||
StandardOutput=null
|
|
||||||
StandardError=journal
|
|
||||||
|
|
||||||
# Hardening measures
|
|
||||||
PrivateTmp=true
|
|
||||||
ProtectSystem=full
|
|
||||||
NoNewPrivileges=true
|
|
||||||
PrivateDevices=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
" | sudo tee /etc/systemd/system/${systemdService}.service
|
|
||||||
sudo chown root:root /etc/systemd/system/${systemdService}.service
|
|
||||||
|
|
||||||
echo "# Allowing port ${portprefix}8000 through the firewall"
|
|
||||||
sudo ufw allow "${portprefix}8000" comment "${netprefix}spark-wallet"
|
|
||||||
|
|
||||||
/home/admin/config.scripts/tor.onion-service.sh ${netprefix}spark-wallet 443 ${portprefix}8000
|
|
||||||
|
|
||||||
# setting value in raspi blitz config
|
|
||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}spark "on"
|
|
||||||
|
|
||||||
sudo systemctl enable ${systemdService}
|
|
||||||
sudo systemctl start ${systemdService}
|
|
||||||
echo "# OK - the ${systemdService}.service is now enabled & started"
|
|
||||||
echo "# Monitor with: sudo journalctl -f -u ${systemdService}"
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $1 = off ];then
|
|
||||||
|
|
||||||
sudo systemctl stop ${systemdService} 2>/dev/null
|
|
||||||
sudo systemctl disable ${systemdService} 2>/dev/null
|
|
||||||
|
|
||||||
/home/admin/config.scripts/tor.onion-service.sh off ${netprefix}spark-wallet
|
|
||||||
|
|
||||||
# purge
|
|
||||||
if [ "$(echo "$@" | grep -c purge)" -gt 0 ];then
|
|
||||||
echo "# Delete install directory"
|
|
||||||
sudo rm -rf /home/bitcoin/spark-wallet
|
|
||||||
fi
|
|
||||||
# setting value in raspi blitz config
|
|
||||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}spark "off"
|
|
||||||
echo "# ${netprefix}spark was uninstalled"
|
|
||||||
fi
|
|
Loading…
x
Reference in New Issue
Block a user