Skip to content

Commit

Permalink
fix set env
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-shashank committed Jun 6, 2024
1 parent 61fed65 commit 10678e8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ansible/archival-snapshots/resources/set_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
ADMIN_TOKEN=$(cat admin_token)

# Set FULLNODE_API_INFO
export FULLNODE_API_INFO="$ADMIN_TOKEN:/ip4/127.0.0.1/tcp/3456/http"

# Save the environment variable to a file and source it
if echo "export FULLNODE_API_INFO=\"$FULLNODE_API_INFO\"" > /tmp/forest-archival.env && source /tmp/forest-archival.env; then
echo "Environment variable saved to and loaded from /tmp/forest-archival.env"
fi
echo 'export FULLNODE_API_INFO="$ADMIN_TOKEN:/ip4/127.0.0.1/tcp/3456/http"' >> ~/.bashrc
source ~/.bashrc

# Use the environment variable
echo "Using FULLNODE_API_INFO: $FULLNODE_API_INFO"

0 comments on commit 10678e8

Please sign in to comment.