diff --git a/Makefile b/Makefile index e61bd0602005..87d4d7a6a2dc 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CONF_PATH?=/etc/packetbeat VERSION?=1.0.0-beta2 ARCH?=$(shell uname -m) GODEP=$(GOPATH)/bin/godep +PREFIX?=/build GOFILES = $(shell find . -type f -name '*.go') packetbeat: $(GOFILES) @@ -64,6 +65,18 @@ darwin_dist: packetbeat tar czvf packetbeat-$(VERSION)-darwin.tgz packetbeat-$(VERSION)-darwin shasum packetbeat-$(VERSION)-darwin.tgz > packetbeat-$(VERSION)-darwin.tgz.sha1.txt +.PHONY: install_cfg +install_cfg: + cp etc/packetbeat.yml $(PREFIX)/packetbeat-linux.yml + cp etc/packetbeat.template.json $(PREFIX)/packetbeat.template.json + # darwin + cp etc/packetbeat.yml $(PREFIX)/packetbeat-darwin.yml + sed -i .bk 's/device: any/device: en0/' $(PREFIX)/packetbeat-darwin.yml + # win + cp etc/packetbeat.yml $(PREFIX)/packetbeat-win.yml + sed -i .bk 's/device: any/device: 1/' $(PREFIX)/packetbeat-win.yml + + .PHONY: gofmt gofmt: go fmt ./...