This file is indexed.

postinst is in lyskom-server 2.1.2-13.

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
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh -e
# postinst script for lyskom-server
#
# see: dh_installdeb(1)

# Source debconf library.
. /usr/share/debconf/confmodule

if test "$1" = "configure"; then
  # Add the user 'lyskom' to run the server
  adduser --quiet --system --no-create-home --home /var/lib/lyskom --shell /bin/sh lyskom

  # Set database to be owned by the 'lyskom' user
  for f in /var/lib/lyskom-server /var/log/lyskom-server; do
    if ! dpkg-statoverride --list $f >/dev/null 2>&1; then
      dpkg-statoverride --update --add lyskom root 0750 $f
    fi
  done

  # Install default database if none exists
  if [ ! -e /var/lib/lyskom-server/lyskomd-data ]; then
    # Get selected database language
    db_get lyskom-server/language

    if [ "$RET" = "Swedish" ]; then
      install -m 0640 -o lyskom /usr/share/lyskom-server/default/lyskomd-data /var/lib/lyskom-server/lyskomd-data
    else
      install -m 0640 -o lyskom /usr/share/lyskom-server/default/lyskomd-data-en /var/lib/lyskom-server/lyskomd-data
    fi
    install -m 0640 -o lyskom /usr/share/lyskom-server/default/lyskomd-texts /var/lib/lyskom-server/
  fi

fi

# Do anything debhelper wants to do
# Automatically added by dh_installinit
if [ -x "/etc/init.d/lyskom-server" ]; then
	if [ ! -e "/etc/init/lyskom-server.conf" ]; then
		update-rc.d lyskom-server defaults >/dev/null
	fi
	invoke-rc.d lyskom-server start || exit $?
fi
# End automatically added section