-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3df4ea
commit 01dff19
Showing
3 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Read the ADMIN_TOKEN from the file | ||
ADMIN_TOKEN=$(cat admin_token) | ||
|
||
# Check if the environment variable is set | ||
if [ -z "$FULLNODE_API_INFO" ]; then | ||
echo "FULLNODE_API_INFO is not set. Setting it now." | ||
export FULLNODE_API_INFO="$ADMIN_TOKEN:/ip4/127.0.0.1/tcp/3456/http" | ||
else | ||
echo "FULLNODE_API_INFO is already set to: $FULLNODE_API_INFO" | ||
fi | ||
|
||
# Save the environment variable to a file | ||
echo "export FULLNODE_API_INFO=\"$FULLNODE_API_INFO\"" > forest-archival.env | ||
|
||
# Source the file to load the environment variable | ||
. forest-archival.env | ||
|
||
# Use the environment variable | ||
echo "Using FULLNODE_API_INFO: $FULLNODE_API_INFO" |