forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Commit install/remove scripts instead of generating, stop ser…
…vice before removing
- Loading branch information
Showing
6 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
user_check() { | ||
getent passwd "$1" > /dev/null 2>&1 | ||
} | ||
|
||
user_create() { | ||
# Create a system user. A system user is one within the system uid range and | ||
# has no expiration | ||
useradd -r "$1" | ||
} | ||
|
||
if ! user_check "kibana" ; then | ||
user_create "kibana" | ||
fi | ||
chown kibana /opt/kibana/optimize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
user_check() { | ||
getent passwd "$1" > /dev/null 2>&1 | ||
} | ||
|
||
user_remove() { | ||
userdel "$1" | ||
} | ||
|
||
case $1 in | ||
purge|0) | ||
if user_check "kibana" ; then | ||
user_remove "kibana" | ||
fi | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
echo -n "Stopping kibana service..." | ||
if command -v systemctl >/dev/null; then | ||
systemctl --no-reload stop kibana.service | ||
fi | ||
if [ -x /etc/init.d/kibana ]; then | ||
if command -v invoke-rc.d >/dev/null; then | ||
invoke-rc.d kibana stop | ||
else | ||
/etc/init.d/kibana stop | ||
fi | ||
fi | ||
echo " OK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters