mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-04 20:12:37 +02:00
migration reset password c
This commit is contained in:
@@ -7,6 +7,9 @@ logFile="/home/admin/raspiblitz.log.migration"
|
|||||||
infoFile="/home/admin/raspiblitz.info"
|
infoFile="/home/admin/raspiblitz.info"
|
||||||
source ${infoFile}
|
source ${infoFile}
|
||||||
|
|
||||||
|
# SETUPFILE - data from setup process
|
||||||
|
source /var/cache/raspiblitz/temp/raspiblitz.setup
|
||||||
|
|
||||||
# CONFIGFILE - configuration of RaspiBlitz
|
# CONFIGFILE - configuration of RaspiBlitz
|
||||||
configFile="/mnt/hdd/raspiblitz.conf"
|
configFile="/mnt/hdd/raspiblitz.conf"
|
||||||
|
|
||||||
@@ -42,6 +45,17 @@ if [ "${err}" != "" ]; then
|
|||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# set password c if given in flag from migration prep
|
||||||
|
passwordFlagExists=$(sudo ls /mnt/hdd/passwordc.flag | grep -c "passwordc.flag")
|
||||||
|
if [ "${passwordFlagExists}" == "1" ]; then
|
||||||
|
echo "Found /mnt/hdd/passwordc.flag .. changing password" >> ${logFile}
|
||||||
|
oldPasswordC=$(sudo cat /mnt/hdd/passwordc.flag)
|
||||||
|
sudo /home/admin/config.scripts/lnd.initwallet.py change-password "${oldPasswordC}" "${passwordC}" >> ${logFile}
|
||||||
|
sudo shred -u /mnt/hdd/passwordc.flag
|
||||||
|
else
|
||||||
|
echo "No /mnt/hdd/passwordc.flag" >> ${logFile}
|
||||||
|
fi
|
||||||
|
|
||||||
# if free space is lower than 100GB (100000000) delete backup files
|
# if free space is lower than 100GB (100000000) delete backup files
|
||||||
if [ "${hddDataFreeKB}" != "" ] && [ ${hddDataFreeKB} -lt 407051412 ]; then
|
if [ "${hddDataFreeKB}" != "" ] && [ ${hddDataFreeKB} -lt 407051412 ]; then
|
||||||
echo "- free space of data disk is low ... deleting 'backup_migration'" >> ${logFile}
|
echo "- free space of data disk is low ... deleting 'backup_migration'" >> ${logFile}
|
||||||
|
Reference in New Issue
Block a user