mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 10:12:06 +01:00
autounlock rewrite
This commit is contained in:
parent
9bd1d6c2bd
commit
f3d305329d
@ -296,11 +296,7 @@ do
|
||||
if [ ${locked} -gt 0 ]; then
|
||||
|
||||
echo "STARTING AUTO-UNLOCK ..."
|
||||
|
||||
# building REST command
|
||||
passwordC=$(sudo cat /root/lnd.autounlock.pwd)
|
||||
command="sudo python3 /home/admin/config.scripts/lnd.unlock.py '${passwordC}'"
|
||||
bash -c "${command}"
|
||||
sudo /home/admin/config.scripts/lnd.unlock.sh '${passwordC}'
|
||||
|
||||
fi
|
||||
fi
|
||||
|
@ -49,9 +49,9 @@ Password C will be stored on the device.
|
||||
echo "SYSTEMD RESTART LOG: lightning (LND)" > /home/admin/systemd.lightning.log
|
||||
sudo systemctl restart lnd
|
||||
sleep 4
|
||||
result=$(sudo python /home/admin/config.scripts/lnd.unlock.py ${passwordC})
|
||||
invalid=$(echo "${result}" | grep -c 'invalid')
|
||||
if [ ${invalid} -gt 0 ];then
|
||||
error=""
|
||||
source <(sudo /home/admin/config.scripts/lnd.unlock.sh '${passwordC}')
|
||||
if [ ${error} -gt 0 ];then
|
||||
echo "# PASSWORD C is wrong - try again or cancel"
|
||||
sleep 3
|
||||
sudo /home/admin/config.scripts/lnd.autounlock.sh on
|
||||
|
Loading…
Reference in New Issue
Block a user