blob: 82ff64dbbdaa9f6e29b9e5b1eef2e147ab13e960 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
post_install() {
getent group elasticsearch >/dev/null 2>&1 || groupadd -g 114 elasticsearch &>/dev/null
getent passwd elasticsearch >/dev/null 2>&1 || useradd -u 114 -g elasticsearch -d /usr/share/elasticsearch -s /bin/false elasticsearch &>/dev/null
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch
chown -R elasticsearch:elasticsearch /var/lib/elasticsearch
chown -R elasticsearch:elasticsearch /var/log/elasticsearch
usr/bin/systemd-tmpfiles --create elasticsearch.conf
}
post_upgrade(){
getent group elasticsearch >/dev/null 2>&1 || groupadd -g 114 elasticsearch &>/dev/null
getent passwd elasticsearch >/dev/null 2>&1 || useradd -u 114 -g elasticsearch -d /usr/share/elasticsearch -s /bin/false elasticsearch &>/dev/null
}
post_remove() {
if getent passwd elasticsearch >/dev/null 2>&1; then
userdel elasticsearch
fi
if getent group elasticsearch >/dev/null 2>&1; then
groupdel elasticsearch
fi
}
|