[deb/rpm] manage pid folder (#68262)
* [deb/rpm] manage pid folder This adds a tmpfiles.d configuration file for systemd users, and changes the path for both systemd and sysv to /var/run/kibana/kibana.pid. pid file generation is left unmodified for a future pr. * cleanup Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
858523eac6
commit
1e45e988e8
3 changed files with 8 additions and 11 deletions
|
@ -123,9 +123,9 @@ export async function runFpm(config, log, build, type, pkgSpecificFlags) {
|
|||
// copy the data directory at /var/lib/kibana
|
||||
`${resolveWithTrailingSlash(fromBuild('data'))}=/var/lib/kibana/`,
|
||||
|
||||
// copy the generated pleaserun services for systemd and sysv into /etc/
|
||||
`${resolveWithTrailingSlash(__dirname, 'service_templates/sysv/etc')}=/etc/`,
|
||||
`${resolveWithTrailingSlash(__dirname, 'service_templates/systemd/etc')}=/etc/`,
|
||||
// copy package configurations
|
||||
`${resolveWithTrailingSlash(__dirname, 'service_templates/sysv/')}=/`,
|
||||
`${resolveWithTrailingSlash(__dirname, 'service_templates/systemd/')}=/`,
|
||||
];
|
||||
|
||||
log.debug('calling fpm with args:', args);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
d /var/run/kibana 0755 kibana kibana - -
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
name=kibana
|
||||
program=/usr/share/kibana/bin/kibana
|
||||
pidfile="/var/run/$name.pid"
|
||||
pidfile="/var/run/kibana/$name.pid"
|
||||
|
||||
[ -r /etc/default/$name ] && . /etc/default/$name
|
||||
[ -r /etc/sysconfig/$name ] && . /etc/sysconfig/$name
|
||||
|
@ -37,17 +37,13 @@ emit() {
|
|||
}
|
||||
|
||||
start() {
|
||||
|
||||
# Ensure the log directory is setup correctly.
|
||||
[ ! -d "/var/log/kibana/" ] && mkdir "/var/log/kibana/"
|
||||
chown "$user":"$group" "/var/log/kibana/"
|
||||
chmod 755 "/var/log/kibana/"
|
||||
|
||||
|
||||
# Setup any environmental stuff beforehand
|
||||
|
||||
|
||||
# Run the program!
|
||||
[ ! -d "/var/run/kibana/" ] && mkdir "/var/run/kibana/"
|
||||
chown "$user":"$group" "/var/run/kibana/"
|
||||
chmod 755 "/var/run/kibana/"
|
||||
|
||||
chroot --userspec "$user":"$group" "$chroot" sh -c "
|
||||
|
||||
|
|
Loading…
Reference in a new issue