blob: e0b511d4d6b8ba55a03331ab33d44be974530e4b (
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
25
26
27
28
29
|
GROUP=http
USER=http
pre_install() {
getent group ${GROUP} > /dev/null || groupadd --system ${GROUP}
getent passwd ${USER} > /dev/null || useradd --system --gid ${USER} --home-dir /srv/http --shell /usr/bin/nologin --no-create-home ${USER}
}
post_install() {
chown -R http:http /etc/glpi
chown -R http:http /var/log/glpi
chown -R http:http /var/lib/glpi
chown -R http:http /usr/share/webapps/glpi
}
pre_upgrade() {
pre_install
}
post_upgrade() {
post_install
# Needed to update the translations
rm -f /var/lib/glpi/_sessions/*
echo ">============================================================<"
echo -e "To update translations, do the following:\nphp /usr/share/webapps/glpi/bin/console cache:clear\nsystemctl restart httpd\n"
echo ">============================================================<"
}
# vim:set ts=2 sw=2 et:
|