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