mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-15 12:50:47 +02:00
Simplify wait for block index script (#1321)
This commit is contained in:
parent
e83cbf1faa
commit
c6d70ad862
1 changed files with 3 additions and 9 deletions
|
|
@ -5,22 +5,16 @@ set -e
|
|||
|
||||
CMD="$1"
|
||||
|
||||
READY=0
|
||||
|
||||
while [ $READY != 1 ]
|
||||
while true
|
||||
do
|
||||
echo "Trying to run cmd: $CMD" >&2
|
||||
eval $CMD &
|
||||
last_pid=$!
|
||||
echo "Starting lnd with pid: $last_pid" >&2
|
||||
echo "Sleeping for 20 seconds..."
|
||||
sleep 20
|
||||
echo "Sleeping for 10 seconds..."
|
||||
sleep 10
|
||||
if ps -p $last_pid; then
|
||||
echo "Found running process for pid: $last_pid" >&2
|
||||
READY=1
|
||||
wait $last_pid
|
||||
else
|
||||
echo "Sleeping for 5 seconds..."
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue