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