spaceapi-server/package/archlinux/spaceapi-server.install
2019-11-26 16:43:05 +01:00

31 lines
No EOL
608 B
Text

post_install() {
if ! getent group spaceapi-server >/dev/null; then
groupadd --system spaceapi-server
fi
if ! getent passwd spaceapi-server >/dev/null; then
useradd --system --create-home --gid spaceapi-server --home-dir /var/lib/spaceapi-server \
--shell /usr/sbin/nologin spaceapi-server
fi
chown root:spaceapi-server /etc/spaceapi-server
chmod 0750 /etc/spaceapi-server
systemctl daemon-reload || true
}
pre_remove() {
systemctl stop spaceapi-server.service
userdel spaceapi-server
}
post_remove() {
systemctl daemon-reload
}