post_install() {
  # We need ssh login and thus a valid shell. No way to create
  # the user with sysusers.d(5)?

  if ! getent group gitolite &>/dev/null; then
    groupadd -r -g 196 gitolite >/dev/null
  fi

  if ! getent passwd gitolite &>/dev/null; then
    useradd -m -r -u 196 -g gitolite -d /var/lib/gitolite \
      -s /bin/bash gitolite >/dev/null
  fi
}

post_upgrade() {
  post_install
}

# Do NOT delete the user in post_remove(). It poses a security risk if
# any files are left behind with this ownership.
