Skip to content

Commit

Permalink
fix admin token use
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-shashank committed May 21, 2024
1 parent f6a82d8 commit 095bf0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ansible/archival-snapshots/resources/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ fi
echo "Starting forest daemon"
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=$!
sleep 10s
echo "Forest process started with PID: $FOREST_NODE_PID"

admin_token=$(cat admin_token)
export FULLNODE_API_INFO="${admin_token}:/ip4/127.0.0.1/tcp/3456/http"
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 095bf0b

Please sign in to comment.