cl.hsmtool: fix password display

This commit is contained in:
openoms 2022-08-13 08:48:34 +01:00
parent e07ad71326
commit 64e0ecd6e7
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65

View File

@ -143,10 +143,10 @@ function decryptHSMsecret() {
echo "# using the password from parameter" echo "# using the password from parameter"
elif [ -f $passwordFile ];then elif [ -f $passwordFile ];then
echo "# Getting the password from $passwordFile" echo "# Getting the password from $passwordFile"
password=$(cat sudo cat $passwordFile) password=$(sudo cat $passwordFile)
else else
passwordToFile passwordToFile
password=$(cat sudo cat $passwordFile) password=$(sudo cat $passwordFile)
fi fi
if echo "${password}" | sudo -u bitcoin lightning-hsmtool decrypt \ if echo "${password}" | sudo -u bitcoin lightning-hsmtool decrypt \
"$hsmSecretPath"; then "$hsmSecretPath"; then