From 863c3561df2c95ae0afecf4428bb947e079e80d7 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Mon, 11 Sep 2023 01:44:25 +0200 Subject: [PATCH] #4164 use systemd status --- home.admin/config.scripts/lnd.monitor.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home.admin/config.scripts/lnd.monitor.sh b/home.admin/config.scripts/lnd.monitor.sh index 76ba73c33..e6dc7f86f 100755 --- a/home.admin/config.scripts/lnd.monitor.sh +++ b/home.admin/config.scripts/lnd.monitor.sh @@ -84,6 +84,14 @@ if [ "$2" = "status" ]; then lnd_error_full="" fi + # check if wallet is locked by systemd status (backup) + if [ "${lnd_locked}" == "0" ]; then + walletLockedCount=$(systemctl status ${netprefix}lnd 2>/dev/null | grep -c "Wallet locked") + if [ ${walletLockedCount} -gt 0 ]; then + lnd_locked="1" + fi + fi + # check results if proof for online else lnd_ready="1"