mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
test lnd check script
This commit is contained in:
parent
1d1ecd937a
commit
b996738c14
1 changed files with 35 additions and 0 deletions
35
home.admin/config.scripts/lnd.check.sh
Normal file
35
home.admin/config.scripts/lnd.check.sh
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "# script to check LND states"
|
||||||
|
echo "# lnd.check.sh basic-setup"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" -eq "basic-setup" ]; then
|
||||||
|
|
||||||
|
# check TLS exits
|
||||||
|
tlsExists=$(sudo ls /mnt/hdd/lnd/tls.cert | grep -c 'tls.cert')
|
||||||
|
if [ ${tlsExists} -gt 0 ]; then
|
||||||
|
echo "tls=1"
|
||||||
|
else
|
||||||
|
echo "tls=0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check lnd.conf exits
|
||||||
|
lndConfExists=$(sudo ls /mnt/hdd/lnd/lnd.conf | grep -c 'lnd.conf')
|
||||||
|
if [ ${lndConfExists} -gt 0 ]; then
|
||||||
|
echo "config=1"
|
||||||
|
else
|
||||||
|
echo "config=0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# load config values
|
||||||
|
source <(sudo sed -e 's/\[/#/g' /mnt/hdd/lnd/lnd.conf)
|
||||||
|
echo "debuglevel=${debuglevel}"
|
||||||
|
echo "bitcoin.mainnet=${bitcoin.mainnet}"
|
||||||
|
echo "bitcoin.testnet=${bitcoin.testnet}"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "# FAIL: parameter not known"
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue