force raw output on cscli during install (#323)

fix https://github.com/crowdsecurity/cs-firewall-bouncer/issues/322
This commit is contained in:
mmetc
2023-08-31 10:36:33 +02:00
committed by GitHub
parent 0378d77d1d
commit 78c9cf7f2a
2 changed files with 4 additions and 4 deletions

View File

@@ -61,7 +61,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
@@ -90,7 +90,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

View File

@@ -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"
@@ -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