mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-28 16:58:03 +01:00
parent
fe0e1e518e
commit
91ba149d98
2 changed files with 64 additions and 48 deletions
|
@ -13,7 +13,7 @@
|
||||||
- Update: Thunderhub v0.13.19 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.19)
|
- Update: Thunderhub v0.13.19 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.19)
|
||||||
- Update: LNbits 0.10.9 [details](https://github.com/lnbits/lnbits/releases/tag/0.10.9)
|
- 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: BTCPayServer 1.10.3 (postgres by default with sqlite migration) [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.10.3)
|
||||||
- Update: Balance of Satoshis 15.8.14 (bos) [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#15814)
|
- Update: Specter Desktop 1.13.1 [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v1.13.1)
|
||||||
- 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)
|
||||||
|
|
||||||
## What's new in Version 1.9.0 of RaspiBlitz?
|
## What's new in Version 1.9.0 of RaspiBlitz?
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# https://github.com/cryptoadvance/specter-desktop
|
# https://github.com/cryptoadvance/specter-desktop
|
||||||
|
|
||||||
pinnedVersion="1.8.1"
|
pinnedVersion="1.13.1"
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "config script to switch Specter Desktop on, off, configure or update"
|
echo "config script to switch Specter Desktop on, off, configure or update"
|
||||||
echo "bonus.specter.sh [status|on|off|config|update] <mainnet|testnet|signet>"
|
echo "bonus.specter.sh [status|on|config|update] <mainnet|testnet|signet>"
|
||||||
echo "installing the version $pinnedVersion by default"
|
echo "bonus.specter.sh off <--delete-data|--keep-data>"
|
||||||
exit 1
|
echo "installing the version $pinnedVersion by default"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "# bonus.specter.sh $1 $2"
|
echo "# bonus.specter.sh $1 $2"
|
||||||
|
|
||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
if [ $# -gt 1 ];then
|
if [ $# -gt 1 ]; then
|
||||||
CHAIN=$2
|
CHAIN=$2
|
||||||
chain=${CHAIN::-3}
|
chain=${CHAIN::-3}
|
||||||
fi
|
fi
|
||||||
|
@ -109,7 +110,7 @@ source <(grep -E "^blockfilterindex=.*" /mnt/hdd/${network}/${network}.conf)
|
||||||
|
|
||||||
function configure_specter {
|
function configure_specter {
|
||||||
echo "# --> creating App-config"
|
echo "# --> creating App-config"
|
||||||
if [ "${runBehindTor}" = "on" ];then
|
if [ "${runBehindTor}" = "on" ]; then
|
||||||
proxy="socks5h://localhost:9050"
|
proxy="socks5h://localhost:9050"
|
||||||
torOnly="true"
|
torOnly="true"
|
||||||
tor_control_port="9051"
|
tor_control_port="9051"
|
||||||
|
@ -118,7 +119,7 @@ function configure_specter {
|
||||||
torOnly="false"
|
torOnly="false"
|
||||||
tor_control_port=""
|
tor_control_port=""
|
||||||
fi
|
fi
|
||||||
cat > /home/admin/config.json <<EOF
|
cat >/home/admin/config.json <<EOF
|
||||||
{
|
{
|
||||||
"auth": {
|
"auth": {
|
||||||
"method": "rpcpasswordaspin",
|
"method": "rpcpasswordaspin",
|
||||||
|
@ -143,7 +144,7 @@ EOF
|
||||||
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
||||||
|
|
||||||
echo "# Connect Specter to the default mainnet node"
|
echo "# Connect Specter to the default mainnet node"
|
||||||
cat > /home/admin/default.json <<EOF
|
cat >/home/admin/default.json <<EOF
|
||||||
{
|
{
|
||||||
"name": "raspiblitz_mainnet",
|
"name": "raspiblitz_mainnet",
|
||||||
"alias": "default",
|
"alias": "default",
|
||||||
|
@ -158,19 +159,19 @@ EOF
|
||||||
"fullpath": "/home/specter/.specter/nodes/default.json"
|
"fullpath": "/home/specter/.specter/nodes/default.json"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
sudo mv /home/admin/default.json /home/specter/.specter/nodes/default.json
|
sudo mv /home/admin/default.json /home/specter/.specter/nodes/default.json
|
||||||
sudo chown -RL specter:specter /home/specter/
|
sudo chown -RL specter:specter /home/specter/
|
||||||
|
|
||||||
if [ "${chain}" != "main" ]; then
|
if [ "${chain}" != "main" ]; then
|
||||||
if [ "${chain}" = "test" ];then
|
if [ "${chain}" = "test" ]; then
|
||||||
portprefix=1
|
portprefix=1
|
||||||
elif [ "${chain}" = "sig" ];then
|
elif [ "${chain}" = "sig" ]; then
|
||||||
portprefix=3
|
portprefix=3
|
||||||
fi
|
fi
|
||||||
PORT="${portprefix}8332"
|
PORT="${portprefix}8332"
|
||||||
|
|
||||||
echo "# Connect Specter to the raspiblitz_${chain}net node"
|
echo "# Connect Specter to the raspiblitz_${chain}net node"
|
||||||
cat > /home/admin/raspiblitz_${chain}net.json <<EOF
|
cat >/home/admin/raspiblitz_${chain}net.json <<EOF
|
||||||
{
|
{
|
||||||
"name": "raspiblitz_${chain}net",
|
"name": "raspiblitz_${chain}net",
|
||||||
"alias": "raspiblitz_${chain}net",
|
"alias": "raspiblitz_${chain}net",
|
||||||
|
@ -185,12 +186,11 @@ EOF
|
||||||
"fullpath": "/home/specter/.specter/nodes/raspiblitz_${chain}net.json"
|
"fullpath": "/home/specter/.specter/nodes/raspiblitz_${chain}net.json"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
sudo mv /home/admin/raspiblitz_${chain}net.json /home/specter/.specter/nodes/raspiblitz_${chain}net.json
|
sudo mv /home/admin/raspiblitz_${chain}net.json /home/specter/.specter/nodes/raspiblitz_${chain}net.json
|
||||||
sudo chown -RL specter:specter /home/specter/
|
sudo chown -RL specter:specter /home/specter/
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# config
|
# config
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
configure_specter
|
configure_specter
|
||||||
|
@ -222,6 +222,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||||
echo "# add the user to the debian-tor group"
|
echo "# add the user to the debian-tor group"
|
||||||
sudo usermod -a -G debian-tor specter
|
sudo usermod -a -G debian-tor specter
|
||||||
|
|
||||||
|
echo "# add the user to the bitcoin group"
|
||||||
|
sudo usermod -a -G bitcoin specter
|
||||||
|
|
||||||
# store data on the disk
|
# store data on the disk
|
||||||
sudo mkdir -p /mnt/hdd/app-data/.specter 2>/dev/null
|
sudo mkdir -p /mnt/hdd/app-data/.specter 2>/dev/null
|
||||||
# move old Specter data to app-data (except .env)
|
# move old Specter data to app-data (except .env)
|
||||||
|
@ -258,7 +261,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||||
echo "# --> Installing udev-rules for hardware-wallets"
|
echo "# --> Installing udev-rules for hardware-wallets"
|
||||||
|
|
||||||
# Ledger
|
# Ledger
|
||||||
cat > /home/admin/20-hw1.rules <<EOF
|
cat >/home/admin/20-hw1.rules <<EOF
|
||||||
HW.1 / Nano
|
HW.1 / Nano
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c|2b7c|3b7c|4b7c", TAG+="uaccess", TAG+="udev-acl", OWNER="specter"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c|2b7c|3b7c|4b7c", TAG+="uaccess", TAG+="udev-acl", OWNER="specter"
|
||||||
# Blue
|
# Blue
|
||||||
|
@ -274,7 +277,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004|4000|4001|40
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# ColdCard
|
# ColdCard
|
||||||
cat > /home/admin/51-coinkite.rules <<EOF
|
cat >/home/admin/51-coinkite.rules <<EOF
|
||||||
# Linux udev support file.
|
# Linux udev support file.
|
||||||
#
|
#
|
||||||
# This is a example udev file for HIDAPI devices which changes the permissions
|
# This is a example udev file for HIDAPI devices which changes the permissions
|
||||||
|
@ -293,7 +296,7 @@ KERNEL=="hidraw*", ATTRS{idVendor}=="d13e", ATTRS{idProduct}=="cc10", GROUP="plu
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Trezor
|
# Trezor
|
||||||
cat > /home/admin/51-trezor.rules <<EOF
|
cat >/home/admin/51-trezor.rules <<EOF
|
||||||
# Trezor: The Original Hardware Wallet
|
# Trezor: The Original Hardware Wallet
|
||||||
# https://trezor.io/
|
# https://trezor.io/
|
||||||
#
|
#
|
||||||
|
@ -314,7 +317,7 @@ KERNEL=="hidraw*", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="53c1", MODE="0660
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# KeepKey
|
# KeepKey
|
||||||
cat > /home/admin/51-usb-keepkey.rules <<EOF
|
cat >/home/admin/51-usb-keepkey.rules <<EOF
|
||||||
# KeepKey: Your Private Bitcoin Vault
|
# KeepKey: Your Private Bitcoin Vault
|
||||||
# http://www.keepkey.com/
|
# http://www.keepkey.com/
|
||||||
# Put this file into /usr/lib/udev/rules.d or /etc/udev/rules.d
|
# Put this file into /usr/lib/udev/rules.d or /etc/udev/rules.d
|
||||||
|
@ -338,7 +341,7 @@ EOF
|
||||||
|
|
||||||
# install service
|
# install service
|
||||||
echo "# --> Install specter systemd service"
|
echo "# --> Install specter systemd service"
|
||||||
cat > /home/admin/specter.service <<EOF
|
cat >/home/admin/specter.service <<EOF
|
||||||
# systemd unit for Specter Desktop
|
# systemd unit for Specter Desktop
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
|
@ -368,15 +371,23 @@ EOF
|
||||||
|
|
||||||
sudo mv /home/admin/specter.service /etc/systemd/system/specter.service
|
sudo mv /home/admin/specter.service /etc/systemd/system/specter.service
|
||||||
sudo systemctl enable specter
|
sudo systemctl enable specter
|
||||||
|
echo "# --> OK - the specter service is now enabled"
|
||||||
|
|
||||||
|
source <(/home/admin/_cache.sh get state)
|
||||||
|
if [ "${state}" == "ready" ]; then
|
||||||
|
# start service
|
||||||
|
echo "# --> starting service ..."
|
||||||
|
sudo systemctl start specter
|
||||||
|
echo "# --> OK - the specter service is now started"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "# --> OK - the specter service is now enabled and started"
|
|
||||||
else
|
else
|
||||||
echo "# --> specter already installed."
|
echo "# --> specter already installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# setting value in raspi blitz config
|
# setting value in raspi blitz config
|
||||||
/home/admin/config.scripts/blitz.conf.sh set specter "on"
|
/home/admin/config.scripts/blitz.conf.sh set specter "on"
|
||||||
|
|
||||||
# Hidden Service for SERVICE if Tor is active
|
# Hidden Service for SERVICE if Tor is active
|
||||||
if [ "${runBehindTor}" = "on" ]; then
|
if [ "${runBehindTor}" = "on" ]; then
|
||||||
# make sure to keep in sync with tor.network.sh script
|
# make sure to keep in sync with tor.network.sh script
|
||||||
|
@ -402,7 +413,7 @@ EOF
|
||||||
echo "# blockfilterindex is already active"
|
echo "# blockfilterindex is already active"
|
||||||
fi
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -420,16 +431,17 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
isInstalled=$(sudo ls /etc/systemd/system/specter.service 2>/dev/null | grep -c 'specter.service')
|
isInstalled=$(sudo ls /etc/systemd/system/specter.service 2>/dev/null | grep -c 'specter.service')
|
||||||
if [ ${isInstalled} -eq 0 ]; then
|
if [ ${isInstalled} -gt 0 ]; then
|
||||||
echo "error='was not installed'"
|
# removing base systemd service & code
|
||||||
exit 1
|
echo "# --> REMOVING the specter.service"
|
||||||
|
sudo systemctl stop specter
|
||||||
|
sudo systemctl disable specter
|
||||||
|
sudo rm /etc/systemd/system/specter.service
|
||||||
|
else
|
||||||
|
echo "# --> The specter.service is not installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# removing base systemd service & code
|
# pip uninstall
|
||||||
echo "# --> REMOVING Specter Desktop"
|
|
||||||
sudo systemctl stop specter
|
|
||||||
sudo systemctl disable specter
|
|
||||||
sudo rm /etc/systemd/system/specter.service
|
|
||||||
sudo -u specter /home/specter/.env/bin/python3 -m pip uninstall --yes cryptoadvance.specter 1>&2
|
sudo -u specter /home/specter/.env/bin/python3 -m pip uninstall --yes cryptoadvance.specter 1>&2
|
||||||
|
|
||||||
# get delete data status - either by parameter or if not set by user dialog
|
# get delete data status - either by parameter or if not set by user dialog
|
||||||
|
@ -441,16 +453,19 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||||
deleteData="0"
|
deleteData="0"
|
||||||
fi
|
fi
|
||||||
if [ "${deleteData}" == "" ]; then
|
if [ "${deleteData}" == "" ]; then
|
||||||
deleteData=whiptail --defaultno --yesno "Do you want to delete all Data related to specter? This includes also Bitcoin-Core-Wallets managed by specter?" 0 0
|
if (whiptail --title "Delete Data?" --yes-button "Keep Data" --no-button "Delete Data" --yesno "Do you want to delete all data related to Specter? This includes the Bitcoin Core wallets managed by Specter." 0 0); then
|
||||||
|
deleteData="0"
|
||||||
|
else
|
||||||
|
deleteData="1"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# execute on delete data
|
# execute on delete data
|
||||||
if [ "${deleteData}" == "1" ]; then
|
if [ "${deleteData}" == "1" ]; then
|
||||||
echo "# --> Removing wallets in core"
|
echo "# --> Removing wallets in core"
|
||||||
bitcoin-cli listwallets | jq -r .[] | tail -n +2
|
bitcoin-cli listwallets | jq -r .[] | tail -n +2
|
||||||
for i in $(bitcoin-cli listwallets | jq -r .[] | tail -n +2)
|
for i in $(bitcoin-cli listwallets | jq -r .[] | tail -n +2); do
|
||||||
do
|
name=$(echo $i | cut -d"/" -f2)
|
||||||
name=$(echo $i | cut -d"/" -f2)
|
|
||||||
bitcoin-cli unloadwallet specter/$name
|
bitcoin-cli unloadwallet specter/$name
|
||||||
done
|
done
|
||||||
echo "# --> Removing the /mnt/hdd/app-data/.specter"
|
echo "# --> Removing the /mnt/hdd/app-data/.specter"
|
||||||
|
@ -461,10 +476,10 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "# --> Removing the specter user and home directory"
|
echo "# --> Removing the specter user and home directory"
|
||||||
sudo userdel -rf specter
|
sudo userdel -rf specter 2>/dev/null
|
||||||
echo "# --> OK Specter Desktop removed."
|
echo "# --> OK Specter Desktop removed."
|
||||||
|
|
||||||
# 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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -472,6 +487,7 @@ fi
|
||||||
# update
|
# update
|
||||||
if [ "$1" = "update" ]; then
|
if [ "$1" = "update" ]; then
|
||||||
echo "# --> UPDATING Specter Desktop "
|
echo "# --> UPDATING Specter Desktop "
|
||||||
|
sudo -u specter /home/specter/.env/bin/python3 -m pip install --upgrade pip
|
||||||
sudo -u specter /home/specter/.env/bin/python3 -m pip install --upgrade cryptoadvance.specter
|
sudo -u specter /home/specter/.env/bin/python3 -m pip install --upgrade cryptoadvance.specter
|
||||||
echo "# --> Updated to the latest in https://pypi.org/project/cryptoadvance.specter/#history ***"
|
echo "# --> Updated to the latest in https://pypi.org/project/cryptoadvance.specter/#history ***"
|
||||||
echo "# --> Restarting the specter.service"
|
echo "# --> Restarting the specter.service"
|
||||||
|
|
Loading…
Add table
Reference in a new issue