Merge pull request #658 from pieterlexis/debian_packaging

Improve Debian packages
This commit is contained in:
Nick Ethier 2013-09-20 10:41:21 -07:00
commit 18ec4ac5a6
3 changed files with 10 additions and 4 deletions

View file

@ -2,6 +2,10 @@
VERSION="$(awk -F\" '/LOGSTASH_VERSION/ {print $2}' $(dirname $0)/../lib/logstash/version.rb)"
if ! git show-ref --tags | grep -q "$(git rev-parse HEAD)"; then
# HEAD is not tagged, add the date, time and commit hash to the revision
REVISION="+$(date +%Y%m%d%H%M)~$(git rev-parse --short HEAD)"
fi
if [ "$#" -ne 2 ] ; then
echo "Usage: $0 <os> <release>"
@ -95,8 +99,10 @@ case $os in
;;
ubuntu|debian)
fpm -s dir -t deb -n logstash -v "$VERSION" \
-a all --iteration 1-$os \
-d "java6-runtime" \
-a all --iteration "${os}1${REVISION}" \
--url "http://logstash.net" \
--description "An extensible logging pipeline" \
-d "default-jre" \
--deb-user root --deb-group root \
--before-install $os/before-install.sh \
--before-remove $os/before-remove.sh \

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ $1 == "remove" ]; then
if [ $1 = "remove" ]; then
/etc/init.d/logstash stop >/dev/null 2>&1 || true
if getent passwd logstash >/dev/null ; then

View file

@ -101,7 +101,7 @@ case "$1" in
fi
# Check if a config file exists
if ! test -e $CONF_DIR/*.conf; then
if [ ! "$(ls -A $CONF_DIR/*.conf 2> /dev/null)" ]; then
log_failure_msg "There aren't any configuration files in $CONF_DIR"
exit 1
fi