debian: add eobuilder user (#29969)

This commit is contained in:
Christophe Siraut 2019-01-22 11:07:00 +01:00
parent acc742ec38
commit 3588e0cd45
1 changed files with 36 additions and 0 deletions

36
debian/postinst vendored Executable file
View File

@ -0,0 +1,36 @@
#! /bin/sh
set -e
NAME="eobuilder"
USER=$NAME
GROUP=$NAME
CONFIG_DIR="/etc/$NAME"
MANAGE_SCRIPT="/usr/bin/$NAME-manage"
case "$1" in
configure)
# make sure the administrative user exists
if ! getent passwd $USER >/dev/null; then
adduser --disabled-password --quiet --system \
--no-create-home --home /var/lib/$NAME \
--gecos "$NAME user" --group $USER
fi
# ensure dirs ownership
chown -R $USER:$GROUP /var/lib/$NAME
;;
abort-upgrade|abort-remove|abort-deconfigure|triggered)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0