From fea9e0f4cfc78044067f58eb918f1f121cea0c2d Mon Sep 17 00:00:00 2001 From: Ben Westgate Date: Sun, 16 Jun 2024 04:06:33 -0500 Subject: [PATCH] keep Bitcoin Core in favorites if sparrow not installed, mk blocksdir to fix error --- bails/.local/bin/install-core | 2 +- bails/.local/bin/wrapped | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bails/.local/bin/install-core b/bails/.local/bin/install-core index 4561c88..437bf57 100755 --- a/bails/.local/bin/install-core +++ b/bails/.local/bin/install-core @@ -208,7 +208,7 @@ sed -i 's/#rpcport=/rpcport=17600/' "$DOTFILES/.bitcoin/bitcoin.conf" sed -i "s,#datadir=,datadir=$DATA_DIR," "$DOTFILES/.bitcoin/bitcoin.conf" # set -datadir for Tails sed -i "s,#debuglogfile=,debuglogfile=$HOME/.bitcoin/debug.log," "$DOTFILES/.bitcoin/bitcoin.conf" # set log to tmpfs link-dotfiles -[ -e $DATA_DIR/wallets ] || mkdir -p $DATA_DIR/wallets # TODO: this can be replaced by creating the symlink in panic mode solution +[ -e $DATA_DIR/wallets ] || mkdir -p $DATA_DIR/{wallets,blocks} # TODO: this can be replaced by creating the symlink in panic mode solution ln --symbolic --force -b /media/"$USER" $DATA_DIR/wallets # links media mount directory to wallets folder for easier loading of watch encrypted or external media wallets chmod -w $DATA_DIR/wallets # TODO: this can be deleted when panic mode is added ln --symbolic --force -b {"$HOME"/.bitcoin,$DATA_DIR}/debug.log # symlinks to tmpfs debug.log diff --git a/bails/.local/bin/wrapped b/bails/.local/bin/wrapped index 8f8a506..adcdf25 100755 --- a/bails/.local/bin/wrapped +++ b/bails/.local/bin/wrapped @@ -35,7 +35,10 @@ persistent-setup # Checks needed persistent features are on. ln -s /live/persistence/TailsData_unlocked/Persistent/.* ~ # Update favorite apps list -gsettings set org.gnome.shell favorite-apps "['bails.desktop', 'sparrow-Sparrow.desktop', 'tca.desktop', 'org.boum.tails.PersistentStorage.desktop', 'tails-documentation.desktop', 'whisperback.desktop', 'tails-installer.desktop', 'thunderbird.desktop', 'org.keepassxc.KeePassXC.desktop', 'org.kde.kleopatra.desktop']" + +favorites="['bails.desktop', 'bitcoin-qt.desktop', 'tca.desktop', 'org.boum.tails.PersistentStorage.desktop', 'tails-documentation.desktop', 'whisperback.desktop', 'tails-installer.desktop', 'thunderbird.desktop', 'org.keepassxc.KeePassXC.desktop', 'org.kde.kleopatra.desktop']" +which Sparrow && favorites=${favorites/bitcoin-qt/sparrow-Sparrow} +gsettings set org.gnome.shell favorite-apps "$favorites" space=$(( ($(df --output=avail "$DATA_DIR" | tail -1) + \ $(du --summarize "$DATA_DIR/blocks" | cut -f1))/1024 - 10240 ))