Skip to content

Commit e4b2140

Browse files
authored
Configurable Sleeptime (#6)
1 parent 5136216 commit e4b2140

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ docker pull lncm/lnd-unlock
2626
- LNDHOSTNAME (default: lnd) : This is the hostname for the lnd instance. Can be an IP
2727
- HOSTIPPORT (default: 10.254.2.3:8080) : This is the IP and port for the LND rest interface.
2828
- NETWORK (default: mainnet) : This is the network that LND uses and how to find the correct macaroon file
29+
- SLEEPTIME (default: 30) : This is how often we will check to see if its unlocked. There is a default value so you do not need to set it.
2930

3031
## Quick run
3132

unlock.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# Trap signal SIGINT - Explicitly define it
1212
trap exit INT
1313

14+
# Check every 30 seconds by default (or if specified)
15+
SLEEPTIME="${SLEEPTIME:-30}" # Default sleep: 30
16+
1417
# If LNDHOSTNAME not set then LNDHOSTNAME=lnd
1518
if [ -z $LNDHOSTNAME ]; then
1619
LNDHOSTNAME=lnd
@@ -87,5 +90,5 @@ while true; do
8790
>&2 echo "password file doesn't exist"
8891
fi
8992

90-
sleep 30
93+
sleep "$SLEEPTIME"
9194
done

0 commit comments

Comments
 (0)