Skip to content

Commit

Permalink
On upgrade, only restart services instead of stopping them
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Jul 4, 2018
1 parent e0ec05c commit 846ad77
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
set -e

if command -v systemctl >/dev/null ; then
systemctl reload kibana.service
systemctl try-restart kibana.service
elif [ -x /etc/init.d/kibana ]; then
if command -v invoke-rc.d >/dev/null; then
invoke-rc.d kibana try-restart
elif command -v service >/dev/null; then
service kibana try-restart
else
/etc/init.d/kibana try-restart
fi
fi
14 changes: 0 additions & 14 deletions src/dev/build/tasks/os_packages/package_scripts/pre_install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/dev/build/tasks/os_packages/run_fpm.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export async function runFpm(config, log, build, type, pkgSpecificFlags) {

// define install/uninstall scripts
'--after-install', resolve(__dirname, 'package_scripts/post_install.sh'),
'--before-install', resolve(__dirname, 'package_scripts/pre_install.sh'),
'--before-remove', resolve(__dirname, 'package_scripts/pre_remove.sh'),
'--after-remove', resolve(__dirname, 'package_scripts/post_remove.sh'),
'--after-upgrade', resolve(__dirname, 'package_scripts/postinst_upgrade.sh'),

// tell fpm about the config file so that it is called out in the package definition
'--config-files', `/etc/kibana/kibana.yml`,
Expand Down

0 comments on commit 846ad77

Please sign in to comment.