This file is indexed.

config is in openacs 5.7.0+dfsg-2.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
#!/bin/sh

set -e

# Source debconf library.
[ -f /usr/share/debconf/confmodule ] && . /usr/share/debconf/confmodule

# Configure database with old or new values, 
# using dbconfig-common
if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
    # we support pgsql
    dbc_dbtypes="pgsql"
    dbc_dbuser="www-data"
    dbc_dbname='openacs'
    dbc_first_version="5.7.0+dfsg-1"

    # source dbconfig-common stuff
    . /usr/share/dbconfig-common/dpkg/config.pgsql

    configfile=$(mktemp)

    # Old values
    if [ -f /etc/openacs/config.tcl.old_version ]; then
        # dbc_load_include doesn't recognize tcl file format, so we'll create a sh temp file with values from the config.tcl file
        sed -n '/## Debconf changes/,/## End Debconf/p;' /etc/openacs/config.tcl.old_version | sed 's/^[ \t]*set\ //;/^\#/d;s/db_host/dbserver=/;s/db_password/dbpass=/;s/db_port/dbport=/;s/db_user/dbuser=/;s/=[ \t]*/=/;/dbport="5432"/d;/dbserver=localhost/d' | sed '$adbtype=pgsql' > $configfile
        dbc_load_include="sh:$configfile"
        rm -f /etc/openacs/config.tcl.old_version
    fi

    dbc_go openacs $@ || echo 'Automatic configuration using dbconfig-common failed!'

    rm -f $configfile
fi

db_stop

exit 0