1
0
Fork 0
forked from s3lph/matemat
matemat/package/archlinux/matemat.install
2018-11-12 00:01:02 +01:00

31 lines
575 B
Text
Executable file

post_install() {
if ! getent group matemat >/dev/null; then
groupadd --system matemat
fi
if ! getent passwd matemat >/dev/null; then
useradd --system --create-home --gid matemat --home-dir /var/lib/matemat --shell /usr/bin/nologin matemat
fi
chown matemat:matemat /var/lib/matemat
chmod 0750 /var/lib/matemat
ln -sf /var/lib/matemat/upload /usr/lib/matemat/static/upload
systemctl daemon-reload
}
pre_remove() {
systemctl stop matemat.service
userdel matemat
}
post_remove() {
systemctl daemon-reload
}