also fix RPC password

This commit is contained in:
rootzoll
2018-11-28 14:13:17 +01:00
parent 94164615a2
commit f8e4d482fa

View File

@@ -58,8 +58,6 @@ Write them down & store them in a safe place.
passwordValid=0
fi
done
# change user passwords and then change hostname
echo "pi:$result" | sudo chpasswd
echo "root:$result" | sudo chpasswd
@@ -72,13 +70,19 @@ dialog --backtitle "RaspiBlitz" --msgbox "OK - password changed to '$result'\nfo
# repeat until user input is nit length 0
result=""
while [ ${#result} -lt 8 ]
do
dialog --backtitle "RaspiBlitz - Setup"\
--inputbox "Enter your RPC Password B (min 8 chars):" 9 52 2>$_temp
--inputbox "Enter your RPC Password B:" 9 52 2>$_temp
result=$( cat $_temp )
shred $_temp
done
clearedResult=$(echo "${result}" | tr -dc '[:alnum:]-.' | tr -d ' ')
if [ ${#clearedResult} != ${#result} ] || [ ${#clearedResult} -eq 0]; then
clear
echo "FAIL - Password contained not allowed chars (see next screen)"
echo "Press ENTER to continue to start again"
read key
passwordValid=0
else
# set Blockchain RPC Password (for admin cli & template for user bitcoin)
sed -i "s/^rpcpassword=.*/rpcpassword=${result}/g" /home/admin/assets/${network}.conf
@@ -87,3 +91,10 @@ sed -i "s/^${network}d.rpcpass=.*/${network}d.rpcpass=${result}/g" /home/admin/a
# success info dialog
dialog --backtitle "RaspiBlitz - SetUP" --msgbox "OK - RPC password changed to '$result'\n\nNow starting the Setup of your RaspiBlitz." 7 52
clear
fi
done