From 1207eebf8b3bd1354927f7c755d46c69bfd81f7a Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Mon, 29 Mar 2021 15:26:45 -0500 Subject: [PATCH] [deb/rpm] Fix SysV init scripts (#95018) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- src/dev/build/tasks/os_packages/service_templates/env/kibana | 3 +++ .../os_packages/service_templates/sysv/etc/init.d/kibana | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dev/build/tasks/os_packages/service_templates/env/kibana b/src/dev/build/tasks/os_packages/service_templates/env/kibana index 047952f7ca2cc..85e25b2900ce6 100644 --- a/src/dev/build/tasks/os_packages/service_templates/env/kibana +++ b/src/dev/build/tasks/os_packages/service_templates/env/kibana @@ -1,5 +1,8 @@ user="kibana" group="kibana" +chroot="/" +chdir="/" +nice="" KBN_PATH_CONF="/etc/kibana" RESTART_ON_UPGRADE="false" diff --git a/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana b/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana index eedd4898ce6c3..37e2673202573 100755 --- a/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana +++ b/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana @@ -63,8 +63,8 @@ start() { chroot --userspec "$user":"$group" "$chroot" sh -c " cd \"$chdir\" - exec \"$program $args\" - " >> /var/log/kibana/kibana.log 2>&1 & + exec \"$program\" \"$args\" + " >> /var/log/kibana/startup.log 2>&1 & # Generate the pidfile from here. If we instead made the forked process # generate it there will be a race condition between the pidfile writing