eobuilder/debian/postinst

37 lines
639 B
Bash
Executable File

#! /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 $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