mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-14 01:19:16 +00:00
19 lines
605 B
Bash
Executable File
19 lines
605 B
Bash
Executable File
#!/bin/bash
|
|
|
|
PASSWORD=$1
|
|
HASH=$(echo -n "$PASSWORD" | sha256sum | awk '{print $1}')
|
|
|
|
# Change Linux Password
|
|
echo "admin:$PASSWORD" | chpasswd
|
|
|
|
# Save hashed password
|
|
echo "$HASH" > /home/bitcoin/.mynode/.hashedpw
|
|
|
|
# Change RTL password
|
|
sed -i "s/rtlPassHashed=.*/rtlPassHashed=$HASH/g" /opt/mynode/RTL/RTL.conf
|
|
systemctl restart rtl &
|
|
|
|
# Change LND Admin Password
|
|
#cp -f /usr/share/mynode/lnd_admin_credentials.json /home/bitcoin/.lnd-admin/credentials.json
|
|
#sed -i "s/\"adminPasswordSha256\":.*/\"adminPasswordSha256\": \"$HASH\"/g" /home/bitcoin/.lnd-admin/credentials.json
|
|
#systemctl restart lnd_admin |