diff --git a/docker-compose.yml b/docker-compose.yml index ef16310..1feac87 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: restart: unless-stopped depends_on: - lnd1 - entrypoint: ["/wait-for-lnd.sh", "lnd1", "1"] + entrypoint: ["/wait-for-lnd.sh", "lnd1"] command: --address=https://lnd1:10009 --cert-path=/root/.lnd/tls.cert --macaroon-path=/root/.lnd/data/chain/bitcoin/regtest/admin.macaroon --log-level=trace --grpc-host=0.0.0.0 environment: - RUST_BACKTRACE=1 @@ -89,7 +89,7 @@ services: restart: unless-stopped depends_on: - lnd2 - entrypoint: ["/wait-for-lnd.sh", "lnd2", "3"] + entrypoint: ["/wait-for-lnd.sh", "lnd2"] command: --address=https://lnd2:10009 --cert-path=/root/.lnd/tls.cert --macaroon-path=/root/.lnd/data/chain/bitcoin/regtest/admin.macaroon --log-level=trace --grpc-host=0.0.0.0 environment: - RUST_BACKTRACE=1 diff --git a/docker/lndk/wait-for-lnd.sh b/docker/lndk/wait-for-lnd.sh index 4043e63..ddae2e1 100755 --- a/docker/lndk/wait-for-lnd.sh +++ b/docker/lndk/wait-for-lnd.sh @@ -8,7 +8,6 @@ # delay The delay (in seconds) for the startup of lndk nodes after lnd's gRPC port is ready. # lndk-args The arguments to be passed to the lndk command. -# Function to check if lnd is ready is_lnd_ready() { macaroon=$(base64 /root/.lnd/data/chain/bitcoin/regtest/readonly.macaroon | tr -d '\n') response=$(curl --cacert /root/.lnd/tls.cert -Ss -H "Grpc-Metadata-macaroon: $macaroon" "https://$1:8080/v1/state") @@ -33,13 +32,7 @@ until is_lnd_ready $1; do sleep 2 done -# Delay startup of lndk nodes -# The sleep command is used to pause the script for a specified number of seconds before starting lndk. -# The number of seconds is specified by the second parameter to the script. -echo "Waiting for another $2 seconds before starting lndk..." -sleep "$2" - # Start lndk # The exec command is used to replace the current shell process with the lndk command. # The "${@:3}" part is used to pass all arguments starting from the third one to the lndk command. -exec lndk "${@:3}" \ No newline at end of file +exec lndk "${@:2}" \ No newline at end of file