mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 20:42:41 +02:00
cl.hsmtool unlock: check for passwordfile
This commit is contained in:
@@ -262,8 +262,13 @@ elif [ "$1" = "unlock" ]; then
|
|||||||
while [ $($lightningcli_alias getinfo 2>&1 | grep -c '"id":') -eq 0 ];do
|
while [ $($lightningcli_alias getinfo 2>&1 | grep -c '"id":') -eq 0 ];do
|
||||||
clError=$(sudo journalctl -n5 -u ${netprefix}lightningd)
|
clError=$(sudo journalctl -n5 -u ${netprefix}lightningd)
|
||||||
|
|
||||||
|
# check passwordfile
|
||||||
|
if [ "$(eval echo \$${netprefix}clEncryptedHSM)" = "on" ] && [ ! -f $passwordFile ];then
|
||||||
|
passwordToFile
|
||||||
|
sudo systemctl restart ${netprefix}lightningd
|
||||||
|
|
||||||
# getpassword
|
# getpassword
|
||||||
if [ $(echo "${clError}" | \
|
elif [ $(echo "${clError}" | \
|
||||||
grep -c 'encrypted-hsm: Could not read pass from stdin.') -gt 0 ];then
|
grep -c 'encrypted-hsm: Could not read pass from stdin.') -gt 0 ];then
|
||||||
if [ ${justUnlocked} -eq 0 ];then
|
if [ ${justUnlocked} -eq 0 ];then
|
||||||
if [ -f $passwordFile ];then
|
if [ -f $passwordFile ];then
|
||||||
|
Reference in New Issue
Block a user