Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force raw output on cscli during install #91

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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