mirror of
https://github.com/elastic/logstash.git
synced 2025-04-22 05:37:21 -04:00
Update after-install scripts Use /usr/lib/logstash instead of /opt/logstash More revisions. Using `/usr/share/logstash` instead of `/usr/lib/logstash` Track these new files More work in progress. Proper arg parsing obtained WIP: Use jvm.options like ES Remove facter dependency Due to an update from @jordansissel on pleaserun, facter is no longer necessary Revert Gemfile to proper version Latest work in progress. I added a simple test to logstash.lib.sh to catch empty strings in java options. Added `startup.options`, and touched up `jvm.options` Edited the package scripts to make things play nice with new paths. Tweaked `system-install` to allow users to provide their own `startup.options` file. Patch up merge failure Changes to work with the new logstash.yml Add fpm dependency (build fails without it) Fix missing gems in Gemfile Don't know how these got lost Use /etc/logstash for configuration in packages Update the instructions/documentation for... ...startup.options Merging proposed changes Remove mustache and clamp They're covered by pleaserun anyway Prune config dir from /usr/share/logstash... ...but only when using RPM/DEB packages
37 lines
969 B
Bash
37 lines
969 B
Bash
# CentOS/RHEL and SuSE
|
|
if [ $1 -eq 0 ]; then
|
|
# Upstart
|
|
if [ -r "/etc/init/logstash.conf" ]; then
|
|
if [ -f "/sbin/stop" ]; then
|
|
/sbin/stop logstash >/dev/null 2>&1 || true
|
|
else
|
|
/sbin/service logstash stop >/dev/null 2>&1 || true
|
|
fi
|
|
if [ -f "/etc/init/logstash.conf" ]; then
|
|
rm /etc/init/logstash.conf
|
|
fi
|
|
# SYSV
|
|
elif [ -r "/etc/init.d/logstash" ]; then
|
|
/sbin/chkconfig --del logstash
|
|
if [ -f "/etc/init.d/logstash" ]; then
|
|
rm /etc/init.d/logstash
|
|
fi
|
|
# systemd
|
|
else
|
|
systemctl stop logstash >/dev/null 2>&1 || true
|
|
if [ -f "/etc/systemd/system/logstash-prestart.sh" ]; then
|
|
rm /etc/systemd/system/logstash-prestart.sh
|
|
fi
|
|
|
|
if [ -f "/etc/systemd/system/logstash.service" ]; then
|
|
rm /etc/systemd/system/logstash.service
|
|
fi
|
|
fi
|
|
if getent passwd logstash >/dev/null ; then
|
|
userdel logstash
|
|
fi
|
|
|
|
if getent group logstash > /dev/null ; then
|
|
groupdel logstash
|
|
fi
|
|
fi
|