Create the correct camper user in Debian post install
This commit is contained in:
parent
7b6bae5062
commit
83cf92b8c0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue