mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-05-12 19:20:48 +02:00
parent
274c8e5e6f
commit
5402efea38
@ -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
|
||||||
|
@ -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/)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user