mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[build] Attempt to stop service pre-install
This commit is contained in:
parent
83c580298f
commit
6c6e4d31ff
3 changed files with 16 additions and 3 deletions
|
@ -29,6 +29,7 @@ module.exports = function (grunt) {
|
|||
'--maintainer', 'Kibana Team\ \<info@elastic.co\>',
|
||||
'--license', 'Apache\ 2.0',
|
||||
'--after-install', resolve(packageScriptsDir, 'post_install.sh'),
|
||||
'--before-install', resolve(packageScriptsDir, 'pre_install.sh'),
|
||||
'--before-remove', resolve(packageScriptsDir, 'pre_remove.sh'),
|
||||
'--after-remove', resolve(packageScriptsDir, 'post_remove.sh'),
|
||||
'--config-files', '/opt/kibana/config/kibana.yml',
|
||||
|
|
13
tasks/build/package_scripts/pre_install.sh
Normal file
13
tasks/build/package_scripts/pre_install.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if command -v systemctl >/dev/null && systemctl is-active kibana.service >/dev/null; then
|
||||
systemctl --no-reload stop kibana.service
|
||||
elif [ -x /etc/init.d/kibana ]; then
|
||||
if command -v invoke-rc.d >/dev/null; then
|
||||
invoke-rc.d kibana stop
|
||||
elif command -v service >/dev/null; then
|
||||
service kibana stop
|
||||
else
|
||||
/etc/init.d/kibana stop
|
||||
fi
|
||||
fi
|
|
@ -1,10 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo -n "Stopping kibana service..."
|
||||
if command -v systemctl >/dev/null; then
|
||||
if command -v systemctl >/dev/null && systemctl is-active kibana.service >/dev/null; then
|
||||
systemctl --no-reload stop kibana.service
|
||||
fi
|
||||
if [ -x /etc/init.d/kibana ]; then
|
||||
elif [ -x /etc/init.d/kibana ]; then
|
||||
if command -v invoke-rc.d >/dev/null; then
|
||||
invoke-rc.d kibana stop
|
||||
elif command -v service >/dev/null; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue