Skip to content

Commit 7af3023

Browse files
authored
force raw output on cscli during install (#91)
fix crowdsecurity/cs-firewall-bouncer#322
1 parent 38e9eed commit 7af3023

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ clean: clean-release-dir clean-debian clean-rpm
5656

5757
.PHONY: binary
5858
binary: goversion
59-
$(GOBUILD) $(LD_OPTS) $(BUILD_VENDOR_FLAGS) -o $(BINARY_NAME)
59+
$(GOBUILD) $(LD_OPTS) -o $(BINARY_NAME)
6060

6161
.PHONY: build
6262
build: clean binary
@@ -85,7 +85,7 @@ func-tests: build
8585
RELDIR = $(BINARY_NAME)-$(BUILD_VERSION)
8686

8787
.PHONY: vendor
88-
vendor:
88+
vendor: vendor-remove
8989
$(GOCMD) mod vendor
9090
tar czf vendor.tgz vendor
9191
tar --create --auto-compress --file=$(RELDIR)-vendor.tar.xz vendor

scripts/_bouncer.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ set_local_port() {
162162
local port
163163
command -v cscli >/dev/null || return 0
164164
# the following will fail with a non-LAPI local crowdsec, leaving empty port
165-
port=$(cscli config show --key "Config.API.Server.ListenURI" 2>/dev/null | cut -d ":" -f2 || true)
165+
port=$(cscli config show -oraw --key "Config.API.Server.ListenURI" 2>/dev/null | cut -d ":" -f2 || true)
166166
if [ "$port" != "" ]; then
167167
sed -i "s/localhost:8080/127.0.0.1:$port/g" "$CONFIG"
168168
sed -i "s/127.0.0.1:8080/127.0.0.1:$port/g" "$CONFIG"
@@ -183,7 +183,7 @@ set_local_lapi_url() {
183183
fi
184184
command -v cscli >/dev/null || return 0
185185

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

0 commit comments

Comments
 (0)