Skip to content

Commit

Permalink
Fix env var comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
levidurfee committed Oct 30, 2024
1 parent 82b81b2 commit 29865af
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,18 @@
A simple BIRD CLI tool to show BGP peers in a pretty table.

![xb](example.png)

## instructions

Download one of the binaries from the releases page.

```bash
wget https://github.com/x6c-co/xb/releases/download/v0.1.0-alpha/xb_Linux_x86_64.tar.gz
tar -xf xb_Linux_x86_64.tar.gz
sudo install ./xb /usr/local/bin
xb
```

By default, `xb`, looks for the `bird.ctl` file at `/var/run/bird/bird.ctl`. You
can tell `xb` to use a different path by either passing the `-socket` argument
or using the `BIRD_SOCKET` environment variable.
2 changes: 1 addition & 1 deletion cmd/xb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
)

func main() {
if os.Getenv(birdSocketKey) == emptyString {
if os.Getenv(birdSocketKey) != emptyString {
socketPath = os.Getenv(birdSocketKey)
}

Expand Down

0 comments on commit 29865af

Please sign in to comment.