This file is indexed.

preinst is in usermetricsservice 1.1.1+15.10.20150915-0ubuntu1.

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

. /usr/share/debconf/confmodule

THIS_PACKAGE=usermetricsservice

# creating usermetrics group if he isn't already there
if ! getent group usermetrics >/dev/null; then
        addgroup --system usermetrics
fi

# creating usermetrics user if he isn't already there
if ! getent passwd usermetrics >/dev/null; then
        adduser --system --ingroup usermetrics --home /var/lib/usermetrics usermetrics
        usermod -c "User Metrics" usermetrics
        usermod -d "/var/lib/usermetrics"  usermetrics
        usermod -g "usermetrics"           usermetrics
        usermod -s "/bin/false"            usermetrics
fi

if [ -d /var/lib/usermetrics ]; then
  chown -R usermetrics:usermetrics /var/lib/usermetrics
  chmod 0750 /var/lib/usermetrics
fi



exit 0