mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-11 21:29:29 +02:00
remove manual passwordB change apps with prestart
This commit is contained in:
parent
a7298c0fd9
commit
3969edc9fd
@ -228,6 +228,9 @@ elif [ "${abcd}" = "b" ]; then
|
||||
sed -i "s/^rpcpassword=.*/rpcpassword=${newPassword}/g" /mnt/hdd/${network}/${network}.conf 2>/dev/null
|
||||
sed -i "s/^rpcpassword=.*/rpcpassword=${newPassword}/g" /home/admin/.${network}/${network}.conf 2>/dev/null
|
||||
|
||||
# NOTE: now other bonus apps configs that need passwordB need to be adapted manually
|
||||
# bonus apps that use a "prestart" will adapt themselves on service restart after reboot
|
||||
|
||||
# blitzweb
|
||||
if ! [ -f /etc/nginx/.htpasswd ]; then
|
||||
echo "${newPassword}" | sudo htpasswd -ci /etc/nginx/.htpasswd admin
|
||||
@ -235,31 +238,6 @@ elif [ "${abcd}" = "b" ]; then
|
||||
echo "${newPassword}" | sudo htpasswd -i /etc/nginx/.htpasswd admin
|
||||
fi
|
||||
|
||||
# RTL - keep settings from current RTL-Config.json
|
||||
if [ "${rtlWebinterface}" == "on" ]; then
|
||||
echo "# changing RTL password"
|
||||
cp /home/rtl/RTL/RTL-Config.json /home/rtl/RTL/backup-RTL-Config.json
|
||||
# remove hashed old password
|
||||
#sed -i "/\b\(multiPassHashed\)\b/d" ./RTL-Config.json
|
||||
# set new password
|
||||
cp /home/rtl/RTL/RTL-Config.json /home/admin/RTL-Config.json
|
||||
chown admin:admin /home/admin/RTL-Config.json
|
||||
chmod 600 /home/admin/RTL-Config.json || exit 1
|
||||
node > /home/admin/RTL-Config.json <<EOF
|
||||
//Read data
|
||||
var data = require('/home/rtl/RTL/backup-RTL-Config.json');
|
||||
//Manipulate data
|
||||
data.multiPassHashed = null;
|
||||
data.multiPass = '$newPassword';
|
||||
//Output data
|
||||
console.log(JSON.stringify(data, null, 2));
|
||||
EOF
|
||||
rm -f /home/rtl/RTL/backup-RTL-Config.json
|
||||
rm -f /home/rtl/RTL/RTL-Config.json
|
||||
mv /home/admin/RTL-Config.json /home/rtl/RTL/
|
||||
chown rtl:rtl /home/rtl/RTL/RTL-Config.json
|
||||
fi
|
||||
|
||||
# electrs
|
||||
if [ "${ElectRS}" == "on" ]; then
|
||||
echo "# changing the RPC password for ELECTRS"
|
||||
@ -267,13 +245,6 @@ EOF
|
||||
sudo sed -i "s/^auth = \"$RPC_USER.*\"/auth = \"$RPC_USER:${newPassword}\"/g" /home/electrs/.electrs/config.toml
|
||||
fi
|
||||
|
||||
# BTC-RPC-Explorer
|
||||
if [ "${BTCRPCexplorer}" = "on" ]; then
|
||||
echo "# changing the RPC password for BTCRPCEXPLORER"
|
||||
sudo sed -i "s/^BTCEXP_BITCOIND_PASS=.*/BTCEXP_BITCOIND_PASS=${newPassword}/g" /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
||||
sudo sed -i "s/^BTCEXP_BASIC_AUTH_PASSWORD=.*/BTCEXP_BASIC_AUTH_PASSWORD=${newPassword}/g" /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
||||
fi
|
||||
|
||||
# BTCPayServer
|
||||
if [ "${BTCPayServer}" == "on" ]; then
|
||||
echo "# changing the RPC password for BTCPAYSERVER"
|
||||
|
Loading…
x
Reference in New Issue
Block a user