Skip to content

Commit

Permalink
force raw output on cscli during install (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Aug 31, 2023
1 parent 9cf192e commit e3bcac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ clean: clean-release-dir clean-debian clean-rpm

.PHONY: binary
binary: goversion
$(GOBUILD) $(LD_OPTS) $(BUILD_VENDOR_FLAGS) -o $(BINARY_NAME)
$(GOBUILD) $(LD_OPTS) -o $(BINARY_NAME)

.PHONY: build
build: clean binary
Expand Down Expand Up @@ -85,7 +85,7 @@ func-tests: build
RELDIR = $(BINARY_NAME)-$(BUILD_VERSION)

.PHONY: vendor
vendor:
vendor: vendor-remove
$(GOCMD) mod vendor
tar czf vendor.tgz vendor
tar --create --auto-compress --file=$(RELDIR)-vendor.tar.xz vendor
Expand Down
4 changes: 2 additions & 2 deletions scripts/_bouncer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ set_local_port() {
local port
command -v cscli >/dev/null || return 0
# the following will fail with a non-LAPI local crowdsec, leaving empty port
port=$(cscli config show --key "Config.API.Server.ListenURI" 2>/dev/null | cut -d ":" -f2 || true)
port=$(cscli config show -oraw --key "Config.API.Server.ListenURI" 2>/dev/null | cut -d ":" -f2 || true)
if [ "$port" != "" ]; then
sed -i "s/localhost:8080/127.0.0.1:$port/g" "$CONFIG"
sed -i "s/127.0.0.1:8080/127.0.0.1:$port/g" "$CONFIG"
Expand All @@ -183,7 +183,7 @@ set_local_lapi_url() {
fi
command -v cscli >/dev/null || return 0

port=$(cscli config show --key "Config.API.Server.ListenURI" 2>/dev/null | cut -d ":" -f2 || true)
port=$(cscli config show -oraw --key "Config.API.Server.ListenURI" 2>/dev/null | cut -d ":" -f2 || true)
if [ "$port" = "" ]; then
port=8080
fi
Expand Down

0 comments on commit e3bcac0

Please sign in to comment.