Skip to content

Commit

Permalink
Updated the way run.sh script is run
Browse files Browse the repository at this point in the history
  • Loading branch information
kpachhai committed Nov 27, 2024
1 parent 82b3437 commit f19edb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ modify_config() {
# Check if external_subscriber_addr exists in the file
if grep -q '"external_subscriber_addr"' "$CONFIG_FILE"; then
# Update the existing external_subscriber_addr field
sed -i.bak "s/\"external_subscriber_addr\": \".*\"/\"external_subscriber_addr\": \"$EXTERNAL_SUBSCRIBER_SERVER_ADDRESS\"/" "$CONFIG_FILE"
sed -i.bak "s|\"external_subscriber_addr\": \".*\"|\"external_subscriber_addr\": \"$EXTERNAL_SUBSCRIBER_SERVER_ADDRESS\"|" "$CONFIG_FILE"
else
# Insert the external_subscriber_addr field before the last closing brace
sed -i.bak "s/}/,\"external_subscriber_addr\": \"$EXTERNAL_SUBSCRIBER_SERVER_ADDRESS\"}/" "$CONFIG_FILE"
sed -i.bak "s|}|,\"external_subscriber_addr\": \"$EXTERNAL_SUBSCRIBER_SERVER_ADDRESS\"}|" "$CONFIG_FILE"
fi
fi
}
Expand Down

0 comments on commit f19edb9

Please sign in to comment.