From 54386b0e06eff3f76526e228eaa0ec9763e15ef8 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 18 Jun 2020 21:38:32 +0200 Subject: [PATCH] #1262 detect if LND is not active yet --- home.admin/config.scripts/lnd.tlscert.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home.admin/config.scripts/lnd.tlscert.sh b/home.admin/config.scripts/lnd.tlscert.sh index e32b3609d..423d6e102 100644 --- a/home.admin/config.scripts/lnd.tlscert.sh +++ b/home.admin/config.scripts/lnd.tlscert.sh @@ -77,6 +77,15 @@ fi ### REFRESH if [ "$1" = "refresh" ]; then + + echo "# checking if LND is running" + lndInactive=$(sudo systemctl is-active lnd | grep -c "inactive") + if [ ${lndInactive} -eq 1 ]; then + echo "# FAIL: lnd.tlscert.sh refresh" + echo "error='LND systemd service not activated'" + exit 1 + fi + echo "# making sure services are not running" sudo systemctl stop lnd 2>/dev/null