mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-06-02 23:42:35 +02:00
(bonus.joinmarket.sh): simplify commands; use grep directly instead of cat (#4702)
This commit is contained in:
parent
e12557e2d2
commit
5a742b12a3
@ -28,17 +28,12 @@ https://github.com/openoms/bitcoin-tutorials/blob/master/joinmarket/README.md
|
|||||||
Can also type: 'jm' in the command line to switch to the dedicated user,
|
Can also type: 'jm' in the command line to switch to the dedicated user,
|
||||||
and start the JoininBox menu.
|
and start the JoininBox menu.
|
||||||
" 11 81
|
" 11 81
|
||||||
if [ $? -eq 0 ]; then
|
[ $? -eq 0 ] && sudo su - joinmarket
|
||||||
sudo su - joinmarket
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if sudo
|
# check if sudo
|
||||||
if [ "$EUID" -ne 0 ]; then
|
[ "$EUID" -ne 0 ] && { echo "Please run as root (with sudo)"; exit; }
|
||||||
echo "Please run as root (with sudo)"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
PGPsigner="openoms"
|
PGPsigner="openoms"
|
||||||
PGPpubkeyLink="https://github.com/openoms.gpg"
|
PGPpubkeyLink="https://github.com/openoms.gpg"
|
||||||
@ -157,7 +152,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
|
|
||||||
# set password B
|
# set password B
|
||||||
echo "# setting PASSWORD_B as the password for the 'joinmarket' user"
|
echo "# setting PASSWORD_B as the password for the 'joinmarket' user"
|
||||||
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
PASSWORD_B=$(sudo grep rpcpassword /mnt/hdd/${network}/${network}.conf | cut -c 13-)
|
||||||
echo "joinmarket:$PASSWORD_B" | sudo chpasswd
|
echo "joinmarket:$PASSWORD_B" | sudo chpasswd
|
||||||
|
|
||||||
if [ -f /home/joinmarket/start.joininbox.sh ]; then
|
if [ -f /home/joinmarket/start.joininbox.sh ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user