mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-24 13:38:11 +00:00
Improve RTL password management
This commit is contained in:
parent
e6db0ef393
commit
77d87b0989
|
@ -6,6 +6,9 @@ HASH=$(echo -n "$PASSWORD" | sha256sum | awk '{print $1}')
|
||||||
# Change Linux Password
|
# Change Linux Password
|
||||||
echo "admin:$PASSWORD" | chpasswd
|
echo "admin:$PASSWORD" | chpasswd
|
||||||
|
|
||||||
|
# Save hashed password
|
||||||
|
echo "$HASH" > /home/bitcoin/.mynode/.hashedpw
|
||||||
|
|
||||||
# Change RTL password
|
# Change RTL password
|
||||||
sed -i "s/rtlPassHashed=.*/rtlPassHashed=$HASH/g" /opt/mynode/RTL/RTL.conf
|
sed -i "s/rtlPassHashed=.*/rtlPassHashed=$HASH/g" /opt/mynode/RTL/RTL.conf
|
||||||
systemctl restart rtl
|
systemctl restart rtl
|
|
@ -2,6 +2,14 @@
|
||||||
|
|
||||||
source /usr/share/mynode/mynode_config.sh
|
source /usr/share/mynode/mynode_config.sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# Shut down main services to save memory and CPU
|
||||||
|
systemctl stop bitcoind
|
||||||
|
systemctl stop lnd
|
||||||
|
systemctl stop electrs
|
||||||
|
systemctl stop quicksync
|
||||||
|
|
||||||
# Install any new software
|
# Install any new software
|
||||||
# apt-get -y install ...
|
# apt-get -y install ...
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,10 @@ chown bitcoin:bitcoin /mnt/hdd/mynode/lnd/lnd.conf
|
||||||
|
|
||||||
# RTL config
|
# RTL config
|
||||||
cp /usr/share/mynode/RTL.conf /opt/mynode/RTL/RTL.conf
|
cp /usr/share/mynode/RTL.conf /opt/mynode/RTL/RTL.conf
|
||||||
|
if [ -f /home/bitcoin/.mynode/.hashedpw ]; then
|
||||||
|
HASH=$(cat /home/bitcoin/.mynode/.hashedpw)
|
||||||
|
sed -i "s/rtlPassHashed=.*/rtlPassHashed=$HASH/g" /opt/mynode/RTL/RTL.conf
|
||||||
|
fi
|
||||||
chown bitcoin:bitcoin /opt/mynode/RTL/RTL.conf
|
chown bitcoin:bitcoin /opt/mynode/RTL/RTL.conf
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user