forked from elastic/logstash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various fixes to generated .deb packages
This resolves a few inconsistencies and issues in the generated packages for Debian/Ubuntu: * Creates /etc/logstash/conf.d * Installs a basic defaults file in /etc/default/logstash (which also sets HOME) * Stops creating /var/run/logstash (unused) * Uses /var/lib/logstash as the home directory of the logstash user instead of /home/logstash * Defaults package files to be owned by root, fixes ownership in post-install script * Properly stops service when removing the package on Debian The end result is that after installing, LogStash will pretty much "just work" with only 2 changes: 1) Enable START=yes in /etc/default/logstash 2) Provide a config for the LogStash agent
- Loading branch information
Tray Torrance
committed
Aug 14, 2013
1 parent
dd13128
commit 8925b68
Showing
12 changed files
with
82 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
.*.swp | ||
*.gem | ||
pkg/*.deb | ||
pkg/*.rpm | ||
*.class | ||
.rbx | ||
Gemfile.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/sh | ||
|
||
mkdir -p /home/logstash | ||
chown logstash:logstash /home/logstash | ||
chown -R logstash:logstash /opt/logstash | ||
chown logstash /var/log/logstash | ||
chown logstash:logstash /var/lib/logstash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
#!/bin/sh | ||
|
||
if [ $1 == "remove" ]; then | ||
/etc/init.d/logstash > /dev/null 2>&1 || true | ||
/etc/init.d/logstash stop >/dev/null 2>&1 || true | ||
|
||
if getent passwd logstash >/dev/null ; then | ||
userdel logstash | ||
fi | ||
|
||
if getent group logstash > /dev/null ; then | ||
if getent group logstash >/dev/null ; then | ||
groupdel logstash | ||
fi | ||
|
||
if [ -d "/home/logstash" ] ; then | ||
rm -rf /home/logstash | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# defaults for logstash | ||
|
||
# Start logstash on boot? | ||
START=no | ||
|
||
# pulled in from the init script; makes things easier. | ||
NAME=logstash | ||
|
||
# location of java | ||
JAVA=/usr/bin/java | ||
|
||
# arguments to pass to java | ||
LS_JAVA_OPTS="-Xmx256m -Djava.io.tmpdir=/var/lib/logstash/" | ||
|
||
PIDFILE=/var/run/logstash.pid | ||
|
||
# user id to be invoked as | ||
LS_USER=logstash | ||
|
||
# location of the logstas jar file | ||
LS_JAR=/opt/logstash/logstash.jar | ||
|
||
# logstash home location | ||
LS_HOME=/var/lib/logstash | ||
|
||
# logstash log directory | ||
LOG_DIR=/var/log/logstash | ||
|
||
# logstash log file | ||
LOG_FILE=$LOG_DIR/$NAME.log | ||
|
||
# logstash configuration directory | ||
CONF_DIR=/etc/logstash/conf.d | ||
|
||
# Open file limit | ||
OPEN_FILES=2048 | ||
|
||
# Nice level | ||
NICE=19 | ||
|
||
# Set LogStash options | ||
LS_OPTS="--log ${LOG_FILE}" | ||
|
||
# Set a home directory | ||
HOME=/var/lib/logstash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/sh | ||
|
||
mkdir -p /home/logstash | ||
chown logstash:logstash /home/logstash | ||
chown -R logstash:logstash /opt/logstash | ||
chown logstash /var/log/logstash | ||
chown logstash:logstash /var/lib/logstash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
#!/bin/sh | ||
|
||
if [ $1 == "remove" ]; then | ||
stop logstash > /dev/null 2>&1 || true | ||
stop logstash >/dev/null 2>&1 || true | ||
|
||
if getent passwd logstash >/dev/null ; then | ||
userdel logstash | ||
fi | ||
|
||
if getent group logstash > /dev/null ; then | ||
if getent group logstash >/dev/null ; then | ||
groupdel logstash | ||
fi | ||
|
||
if [ -d "/home/logstash" ] ; then | ||
rm -rf /home/logstash | ||
fi | ||
fi |