-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Darko Draskovic <[email protected]>
- Loading branch information
1 parent
ba2656d
commit f3ab99b
Showing
2 changed files
with
12 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# Determine the network interface's name | ||
NETWORK_INTERFACE=$(ip addr | awk '/^2: /{sub(/:/, "", $2); print $2}') | ||
|
||
# Determine the IP address of the network interface | ||
AGENT_GRPC_ADDR=$(ip addr show dev "$NETWORK_INTERFACE" | awk '/inet / { print $2 }' | cut -d/ -f1):7002 | ||
|
||
# Set the environment variables | ||
export NETWORK_INTERFACE | ||
export AGENT_GRPC_ADDR |