|
37 | 37 | docker compose pull --quiet |
38 | 38 | docker compose up -d |
39 | 39 | |
40 | | - # Wait for services to be ready |
| 40 | + echo "Waiting for electrum server..." |
41 | 41 | while ! nc -z '127.0.0.1' 60001; do sleep 1; done |
42 | | - while [ ! -f lnd/data/chain/bitcoin/regtest/admin.macaroon ]; do sleep 1; done |
| 42 | + echo "Electrum server is ready!" |
| 43 | + |
| 44 | + echo "Waiting for LND to initialize..." |
| 45 | + # Wait for LND container to be running |
| 46 | + timeout 60 bash -c 'until docker ps | grep lnd | grep -q "Up"; do echo "Waiting for LND container..."; sleep 2; done' |
| 47 | + |
| 48 | + # Check if LND directory exists and wait for admin.macaroon |
| 49 | + echo "Checking LND data directory..." |
| 50 | + ls -la lnd/ || echo "LND directory not found" |
| 51 | + ls -la lnd/data/ || echo "LND data directory not found" |
| 52 | + ls -la lnd/data/chain/ || echo "LND chain directory not found" |
| 53 | + ls -la lnd/data/chain/bitcoin/ || echo "LND bitcoin directory not found" |
| 54 | + ls -la lnd/data/chain/bitcoin/regtest/ || echo "LND regtest directory not found" |
| 55 | + |
| 56 | + # Wait for admin.macaroon with timeout and better error handling |
| 57 | + echo "Waiting for admin.macaroon..." |
| 58 | + timeout 120 bash -c 'until [ -f lnd/data/chain/bitcoin/regtest/admin.macaroon ]; do echo "Waiting for admin.macaroon... ($(date))"; sleep 5; done' || { |
| 59 | + echo "Timeout waiting for admin.macaroon. Checking LND logs:" |
| 60 | + docker logs lnd |
| 61 | + echo "LND directory contents:" |
| 62 | + find lnd -name "*.macaroon" -type f 2>/dev/null || echo "No macaroon files found" |
| 63 | + exit 1 |
| 64 | + } |
| 65 | + |
| 66 | + echo "Admin macaroon found! Setting permissions..." |
43 | 67 | chmod -R 777 lnd |
44 | 68 | |
45 | 69 | # Get the runner's public IP (this will be accessible from other runners) |
|
0 commit comments