Create the correct camper user in Debian post install

This commit is contained in:
jordi fita mas 2023-12-21 00:40:01 +01:00
parent 7b6bae5062
commit 83cf92b8c0
1 changed files with 10 additions and 10 deletions

View File

@ -5,25 +5,25 @@ set -e
case "$1" in
configure)
# Create numerus user and group
if ! getent group numerus >/dev/null; then
addgroup --system --quiet numerus
# Create camper user and group
if ! getent group camper >/dev/null; then
addgroup --system --quiet camper
fi
if ! getent passwd numerus >/dev/null; then
if ! getent passwd camper >/dev/null; then
adduser --quiet \
--system \
--disabled-login \
--no-create-home \
--shell /bin/bash \
--ingroup numerus \
--home /usr/share/numerus \
--gecos "Numerus Daemon" \
numerus
--ingroup camper \
--home /usr/share/camper \
--gecos "Camper Daemon" \
camper
fi
# Make sure log directory has correct permissions set
dpkg-statoverride --list "/var/log/numerus" >/dev/null || \
dpkg-statoverride --add --force --quiet --update numerus adm 0750 /var/log/numerus
dpkg-statoverride --list "/var/log/camper" >/dev/null || \
dpkg-statoverride --add --force --quiet --update camper adm 0750 /var/log/camper
;;
abort-upgrade|abort-remove|abort-deconfigure)