2018-01-11 19:53:29 +08:00
|
|
|
post_install() {
|
|
|
|
# Add the 'memgraph' user and group and set permissions on
|
|
|
|
# 'var/*/memgraph' directories.
|
2018-04-10 16:40:03 +08:00
|
|
|
getent group memgraph >/dev/null || groupadd -r memgraph || exit 1
|
|
|
|
getent passwd memgraph >/dev/null || \
|
|
|
|
useradd -r -g memgraph -d /var/lib/memgraph memgraph || exit 1
|
2018-01-11 19:53:29 +08:00
|
|
|
chown memgraph:memgraph /var/lib/memgraph || exit 1
|
|
|
|
chmod 750 /var/lib/memgraph || exit 1
|
|
|
|
chown memgraph:adm /var/log/memgraph || exit 1
|
|
|
|
chmod 750 /var/log/memgraph || exit 1
|
|
|
|
echo "Enable and start 'memgraph.service' to use Memgraph" || exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
pre_remove() {
|
|
|
|
systemctl disable memgraph.service
|
|
|
|
}
|