mirror of
https://github.com/crowdsecurity/cs-firewall-bouncer.git
synced 2024-08-19 01:18:49 +03:00
force raw output on cscli during install (#323)
fix https://github.com/crowdsecurity/cs-firewall-bouncer/issues/322
This commit is contained in:
4
Makefile
4
Makefile
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user