preinst is in candid 1.0.0~alpha+201804191824-24b36a9-0ubuntu2.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/bin/sh
set -e
# creating candid group if he isn't already there
if ! getent group candid >/dev/null; then
    # Adding system group: candid.
    addgroup --system candid >/dev/null
fi
# creating candid user if he isn't already there
if ! getent passwd candid >/dev/null; then
    # Adding system user: candid.
    adduser \
      --system \
          --disabled-login \
      --ingroup candid \
      --gecos "Canonical Identity server" \
      --shell /bin/false \
      --no-create-home --home /nonexistent \
      candid  >/dev/null
fi
# create log dir
mkdir -p /var/log/identity
chown candid:candid /var/log/identity
exit 0
 |