mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-15 09:59:16 +00:00
15 lines
361 B
Bash
Executable File
15 lines
361 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/\"multiPassHashed\":.*/\"multiPassHashed\": \"$HASH\",/g" /opt/mynode/RTL/RTL-Config.json
|
|
systemctl restart rtl &
|