This file is indexed.

postinst is in guacamole 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
34
35
36
37
38
39
40
#!/bin/sh
#
# Simple postinst script for Guacamole which creates a "guacamole-web" group
# and sets the permissions of user-mapping.xml (a file which must sometimes
# contain plaintext passwords) appropriately.
#

# Exit on errors
set -e

GUAC_GROUP="guacamole-web"
GUAC_FILES="/etc/guacamole/user-mapping.xml"
GUAC_FILE_OWNERSHIP="root:$GUAC_GROUP"
GUAC_FILE_MOD="640"

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



# Create guacamole-web group if it does not exist
groupadd -fr "$GUAC_GROUP" ||\
    fail "Could not create group \"$GUAC_GROUP\""

# Change ownership and permissions of Guacamole files
for FILE in $GUAC_FILES
do

    # Update ownership
    chown "$GUAC_FILE_OWNERSHIP" "$FILE" ||\
        fail "Unable to change ownership of $FILE"

    # Update permissions
    chmod "$GUAC_FILE_MOD" "$FILE" ||\
        fail "Unable to change permissions of $FILE"

done