This file is indexed.

postinst is in jetty9 9.2.23-1.

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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
set -e

JETTY_USER=jetty
JETTY_GROUP=jetty

case "$1" in
    configure)
	# Install the default page if no root context exist
	if [ ! -f /var/lib/jetty9/webapps/root.war ]; then
		mkdir -p /var/lib/jetty9/webapps/root
		if [ -z "$(ls -A /var/lib/jetty9/webapps/root)" ]; then
			cp /usr/share/jetty9/default-root/* /var/lib/jetty9/webapps/root
		fi
	fi

	if ! id jetty > /dev/null 2>&1 ; then
	    adduser --system --home /usr/share/jetty9 --no-create-home \
		--group --disabled-password --shell /bin/false \
		$JETTY_USER
	fi
	chown -R jetty:adm /var/cache/jetty9 /var/log/jetty9 /var/lib/jetty9
	chmod 750 /var/log/jetty9

	# Authorize user jetty to open privileged ports via authbind.
	JETTY_UID="`id -u $JETTY_USER`"
	if [ ! -f "/etc/authbind/byuid/$JETTY_UID" ]; then
		if [ ! -d "/etc/authbind/byuid" ]; then
			mkdir -p /etc/authbind/byuid
			chmod 755 /etc/authbind
			chmod 755 /etc/authbind/byuid
		fi
		echo '0.0.0.0/0:1,1023' >/etc/authbind/byuid/$JETTY_UID
		echo '::/0,1-1023' >>/etc/authbind/byuid/$JETTY_UID
		chown $JETTY_USER:$JETTY_GROUP /etc/authbind/byuid/$JETTY_UID
		chmod 700 /etc/authbind/byuid/$JETTY_UID
	fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
	echo "$0 called with unknown argument \`$1'" >&2
	exit 1
    ;;
esac

# Automatically added by dh_installinit/11ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/jetty9" ]; then
		update-rc.d jetty9 defaults >/dev/null
		if [ -n "$2" ]; then
			_dh_action=restart
		else
			_dh_action=start
		fi
		invoke-rc.d jetty9 $_dh_action || exit $?
	fi
fi
# End automatically added section