mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 04:37:19 +02:00
Merge branch 'dev' of https://github.com/rootzoll/raspiblitz into dev
This commit is contained in:
@@ -411,7 +411,8 @@ fi
|
||||
# show JoinMarket stats in place of the LND URI only if the Yield Generator is running
|
||||
source /home/joinmarket/joinin.conf 2>/dev/null
|
||||
if [ "${joinmarket}" = "on" ] && [ $(sudo -u joinmarket pgrep -f "python yg-privacyenhanced.py $YGwallet --wallet-password-stdin" 2>/dev/null | wc -l) -gt 2 ]; then
|
||||
JMstats=$(mktemp 2>/dev/null)
|
||||
trap 'rm -f "$JMstats"' EXIT
|
||||
JMstats=$(mktemp -p /dev/shm)
|
||||
sudo -u joinmarket /home/joinmarket/info.stats.sh > $JMstats
|
||||
JMstatsL1=$(sed -n 1p < "$JMstats")
|
||||
JMstatsL2=$(sed -n 2p < "$JMstats")
|
||||
|
@@ -96,13 +96,13 @@ case $CHOICE in
|
||||
result=""
|
||||
while [ ${#result} -eq 0 ]
|
||||
do
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
l1="Please enter the new name of your LND node:\n"
|
||||
l2="different name is better for a fresh identity\n"
|
||||
l3="one word, keep characters basic & not too long"
|
||||
dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2$l3" 13 52 2>$_temp
|
||||
result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
|
||||
shred -u $_temp
|
||||
echo "processing ..."
|
||||
sleep 3
|
||||
done
|
||||
|
@@ -48,25 +48,25 @@ CHOICE=$(dialog --clear \
|
||||
|
||||
case $CHOICE in
|
||||
ENCRYPT)
|
||||
/home/admin/config.scripts/cln.hsmtool.sh encrypt
|
||||
/home/admin/config.scripts/cln.hsmtool.sh encrypt $CHAIN
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
;;
|
||||
|
||||
DECRYPT)
|
||||
/home/admin/config.scripts/cln.hsmtool.sh decrypt
|
||||
/home/admin/config.scripts/cln.hsmtool.sh decrypt $CHAIN
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
;;
|
||||
|
||||
PASSWORD_C)
|
||||
/home/admin/config.scripts/cln.hsmtool.sh change-password
|
||||
/home/admin/config.scripts/cln.hsmtool.sh change-password $CHAIN
|
||||
;;
|
||||
|
||||
AUTOUNLOCK-ON)
|
||||
/home/admin/config.scripts/cln.hsmtool.sh autounlock-on
|
||||
/home/admin/config.scripts/cln.hsmtool.sh autounlock-on $CHAIN
|
||||
;;
|
||||
|
||||
AUTOUNLOCK-OFF)
|
||||
/home/admin/config.scripts/cln.hsmtool.sh autounlock-off
|
||||
/home/admin/config.scripts/cln.hsmtool.sh autounlock-off $CHAIN
|
||||
;;
|
||||
|
||||
BACKUP)
|
||||
@@ -96,7 +96,7 @@ case $CHOICE in
|
||||
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
|
||||
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/*.*
|
||||
# new
|
||||
/home/admin/config.scripts/cln.hsmtool.sh new
|
||||
/home/admin/config.scripts/cln.hsmtool.sh new $CHAIN
|
||||
;;
|
||||
|
||||
FILERESTORE)
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
trap 'rm -f "$_error"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
_error=$(mktemp -p /dev/shm/)
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
trap 'rm -f "$_error"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
_error=$(mktemp -p /dev/shm/)
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
clear
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
trap 'rm -f "$_error"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
_error=$(mktemp -p /dev/shm/)
|
||||
sudo chmod 7777 ${_error} 2>/dev/null
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
trap 'rm -f "$_error"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
_error=$(mktemp -p /dev/shm/)
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
clear
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
trap 'rm -f "$_error"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
_error=$(mktemp -p /dev/shm/)
|
||||
sudo chmod 7777 ${_error} 2>/dev/null
|
||||
|
@@ -11,12 +11,12 @@ else
|
||||
echo "Opening $EDITFILE"
|
||||
fi
|
||||
|
||||
# trap to delete on any exit
|
||||
trap 'rm -f $conf' EXIT
|
||||
|
||||
# temp conf
|
||||
conf=$(mktemp -p /dev/shm/)
|
||||
|
||||
# trap it
|
||||
trap 'rm -f $conf' 0 1 2 5 15
|
||||
|
||||
dialog \
|
||||
--title "Editing the $EDITFILE" \
|
||||
--editbox "$EDITFILE" 200 200 2> "$conf"
|
||||
|
@@ -17,6 +17,9 @@ if [ "$EUID" -ne 0 ]
|
||||
exit
|
||||
fi
|
||||
|
||||
# trap to delete on any exit
|
||||
trap 'rm -f $_temp' EXIT
|
||||
|
||||
# tempfile
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
|
||||
|
@@ -64,10 +64,11 @@ function passwordToFile() {
|
||||
text="Type or paste the decryption password for the $CHAIN C-lightning wallet"
|
||||
fi
|
||||
# write password into a file in memory
|
||||
# trap to delete on any exit
|
||||
trap 'rm -f $data' EXIT
|
||||
# get password
|
||||
data=$(mktemp -p /dev/shm/)
|
||||
# trap it
|
||||
trap 'rm -f $data' 0 1 2 5 15
|
||||
|
||||
dialog --clear \
|
||||
--backtitle "Enter password" \
|
||||
--title "Enter password" \
|
||||
|
@@ -4,6 +4,8 @@ network=mainnet
|
||||
chain=bitcoin
|
||||
|
||||
if [ "$1" = "-menu" ]; then
|
||||
trap 'rm -f "$_temp"' EXIT
|
||||
trap 'rm -f "$_error"' EXIT
|
||||
_temp=$(mktemp -p /dev/shm/)
|
||||
_error=$(mktemp -p /dev/shm/)
|
||||
|
||||
|
Reference in New Issue
Block a user