mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-25 19:21:57 +02:00
blitz.setpassword:change Password_B for all affected, including RTL
This commit is contained in:
@@ -201,6 +201,15 @@ elif [ "${abcd}" = "b" ]; then
|
||||
sed -i "s/^rpcpassword=.*/rpcpassword=${newPassword}/g" /home/admin/.${network}/${network}.conf 2>/dev/null
|
||||
sed -i "s/^${network}d.rpcpass=.*/${network}d.rpcpass=${newPassword}/g" /mnt/hdd/lnd/lnd.conf 2>/dev/null
|
||||
sed -i "s/^${network}d.rpcpass=.*/${network}d.rpcpass=${newPassword}/g" /home/admin/.lnd/lnd.conf 2>/dev/null
|
||||
# RTL - will change to RTL-Conf.json and deprecate "DEFAULT auth type"
|
||||
sed -i "s/^rtlPass=.*/rtlPass=${newPassword}/g" ./RTL/RTL.conf 2>/dev/null
|
||||
# electrs
|
||||
RPC_USER=$(cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcuser | cut -c 9-)
|
||||
sed -i "s/^cookie = \"$RPC_USER.*\"/cookie = \"$RPC_USER:${newPassword}\"/g" /home/electrs/.electrs/config.toml 2>/dev/null
|
||||
# BTC-RPC-Explorer
|
||||
sed -i "s/^BTCEXP_BITCOIND_URI=$network:\/\/$RPC_USER:.*@127.0.0.1:8332?timeout=10000/BTCEXP_BITCOIND_URI=$network:\/\/$RPC_USER:${newPassword}@127.0.0.1:8332\?timeout=10000/g" /home/bitcoin/.config/btc-rpc-explorer.env 2>/dev/null
|
||||
sed -i "s/^BTCEXP_BITCOIND_PASS=.*/BTCEXP_BITCOIND_PASS=${newPassword}/g" /home/bitcoin/.config/btc-rpc-explorer.env 2>/dev/null
|
||||
sed -i "s/^BTCEXP_BASIC_AUTH_PASSWORD=.*/BTCEXP_BASIC_AUTH_PASSWORD=${newPassword}/g" /home/bitcoin/.config/btc-rpc-explorer.env 2>/dev/null
|
||||
|
||||
echo "OK -> RPC Password B changed"
|
||||
echo "if services are running - reboot is needed to activate new settings"
|
||||
|
@@ -73,10 +73,14 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# prepare RTL.conf file
|
||||
echo "*** RTL.conf ***"
|
||||
cp ./RTL/sample-RTL.conf ./RTL/RTL.conf
|
||||
chmod 600 ./RTL/RTL.conf || exit 1
|
||||
sudo sed -i "s/^macroonPath=.*/macroonPath=\/mnt\/hdd\/lnd\/data\/chain\/${network}\/${chain}net/g" ./RTL/RTL.conf
|
||||
sudo sed -i "s/^lndConfigPath=.*/lndConfigPath=\/mnt\/hdd\/lnd\/lnd.conf/g" ./RTL/RTL.conf
|
||||
sudo sed -i "s/^nodeAuthType=.*/nodeAuthType=DEFAULT/g" ./RTL/RTL.conf
|
||||
sudo sed -i "s/^rtlPass=.*/rtlPass=/g" ./RTL/RTL.conf
|
||||
# getting ready for the phasing out of the "DEFAULT" auth type
|
||||
# will need to change blitz.setpassword.sh too
|
||||
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
||||
sudo sed -i "s/^rtlPass=.*/rtlPass=$PASSWORD_B/g" ./RTL/RTL.conf
|
||||
echo ""
|
||||
|
||||
# open firewall
|
||||
|
Reference in New Issue
Block a user