This file is indexed.

postinst is in guacamole-tomcat 0.8.3-1.2.

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
#!/bin/sh
#
# Script which sets permissions for a Tomcat install of Guacamole, and
# restarts the Tomcat server if requested.
#

# Exit on errors
set -e

# Use debconf
. /usr/share/debconf/confmodule

GUAC_GROUP="guacamole-web"
SC_USER="tomcat8"

# Convenience function for error conditions
fail() {
    echo "$1" >&2
    exit 1
}



# Add servlet container user to guacamole group
usermod --append -G "$GUAC_GROUP" "$SC_USER" ||\
    fail "Could not add $SC_USER to group \"$GUAC_GROUP\""

# Restart Tomcat if asked
db_get guacamole-tomcat/restart-server
if [ "$RET" = "true" ]
then
    invoke-rc.d tomcat8 restart
fi