Skip to content

Commit

Permalink
remove strict error check
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-shashank committed Jun 6, 2024
1 parent 5495ba9 commit 61fed65
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ansible/archival-snapshots/resources/set_env.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#!/bin/bash

## Enable strict error handling, command tracing, and pipefail
set -euxo pipefail

# Read the ADMIN_TOKEN from the file
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.txt && source /tmp/forest-archival-env.txt; then
echo "Environment variable saved to and loaded from /tmp/forest-archival-env.txt"
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

# Use the environment variable
Expand Down

0 comments on commit 61fed65

Please sign in to comment.