Skip to content

Commit

Permalink
When pkging, install the yml instead of the conf file. elastic#5
Browse files Browse the repository at this point in the history
  • Loading branch information
Tudor Golubenco committed Apr 10, 2015
1 parent b094317 commit 6b67fe7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ restoredeps:
install: packetbeat go-daemon/god
install -D packetbeat $(DESTDIR)/$(BIN_PATH)/packetbeat
install -D go-daemon/god $(DESTDIR)/$(BIN_PATH)/packetbeat-god
install -m 644 -D packetbeat.conf $(DESTDIR)/$(CONF_PATH)/packetbeat.conf
install -m 644 -D packetbeat.yml $(DESTDIR)/$(CONF_PATH)/packetbeat.yml

.PHONY: dist
dist: packetbeat go-daemon/god
mkdir packetbeat-$(VERSION)
cp packetbeat packetbeat-$(VERSION)/
cp go-daemon/god packetbeat-$(VERSION)/packetbeat-god
cp packetbeat.conf packetbeat-$(VERSION)/
cp packetbeat.yml packetbeat-$(VERSION)/
tar czvf packetbeat-$(VERSION)-$(ARCH).tar.gz packetbeat-$(VERSION)

.PHONY: gofmt
Expand Down
2 changes: 1 addition & 1 deletion debian/packetbeat.init
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Packetbeat agent software"
NAME=packetbeat
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-c /etc/packetbeat/packetbeat.conf"
DAEMON_ARGS="-c /etc/packetbeat/packetbeat.yml"
PIDFILE=/var/run/packetbeat.pid
WRAPPER="/usr/bin/packetbeat-god"
WRAPPER_ARGS="-r / -n -p $PIDFILE"
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func main() {
// Use our own FlagSet, because some libraries pollute the global one
var cmdLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)

configfile := cmdLine.String("c", "packetbeat.yaml", "Configuration file")
configfile := cmdLine.String("c", "packetbeat.yml", "Configuration file")
file := cmdLine.String("I", "", "file")
loop := cmdLine.Int("l", 1, "Loop file. 0 - loop forever")
debugSelectorsStr := cmdLine.String("d", "", "Enable certain debug selectors")
Expand Down
2 changes: 1 addition & 1 deletion rpm/packetbeat.init
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export PATH
[ -f /etc/sysconfig/packetbeat ] && . /etc/sysconfig/packetbeat
pidfile=${PIDFILE-/var/run/packetbeat.pid}
agent=${PB_AGENT-/usr/bin/packetbeat}
args="-c /etc/packetbeat/packetbeat.conf"
args="-c /etc/packetbeat/packetbeat.yml"
wrapper="packetbeat-god"
wrapperopts="-r / -n -p $pidfile"
RETVAL=0
Expand Down
2 changes: 1 addition & 1 deletion rpm/packetbeat.spec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ install -D rpm/packetbeat.init %{buildroot}/etc/rc.d/init.d/packetbeat
%files
/usr/bin/*
/etc/rc.d/init.d/packetbeat
%config /etc/packetbeat/packetbeat.conf
%config /etc/packetbeat/packetbeat.yml

%doc debian/copyright

Expand Down

0 comments on commit 6b67fe7

Please sign in to comment.