Skip to content

Commit

Permalink
add delay after starting forest daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-shashank committed May 17, 2024
1 parent 0a8137e commit bec59ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ansible/archival-snapshots/resources/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ else
fi

echo "Starting forest daemon"
$FOREST --config ./config.toml --save-token ./admin_token --rpc-address 127.0.0.1:3456 --metrics-address 127.0.0.1:5000 --import-snapshot "$CURRENT_FULL_SNAPSHOT_PATH" &
nohup $FOREST --config ./config.toml --save-token ./admin_token --rpc-address 127.0.0.1:3456 --metrics-address 127.0.0.1:5000 --import-snapshot "$CURRENT_FULL_SNAPSHOT_PATH" > forest.log 2>&1 &
FOREST_NODE_PID=$!

export FULLNODE_API_INFO="$(cat admin_token):/ip4/127.0.0.1/tcp/3456/http"
sleep 60s

admin_token=$(cat admin_token)
export FULLNODE_API_INFO="${admin_token}:/ip4/127.0.0.1/tcp/3456/http"

echo "Waiting for forest to sync to latest network head"
$FOREST_CLI sync wait
Expand Down

0 comments on commit bec59ca

Please sign in to comment.