This file is indexed.

postinst is in citadel-webcit 8.24-dfsg-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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#! /bin/sh
# Abort if any command returns an error value
set -e
. /usr/share/debconf/confmodule

db_version 2.0

case "$1" in
  configure)
	if ! getent group citadel >/dev/null; then
            addgroup --system citadel
        fi

        if ! getent passwd citadel >/dev/null; then
            adduser --system --ingroup citadel --home /var/lib/citadel \
                    --gecos "Citadel system user" --shell /bin/sh \
                    --disabled-password --no-create-home --shell /bin/false citadel
        fi

        chown -R citadel:citadel /etc/citadel
        chown -R citadel:citadel /var/lib/citadel

	if test -e /etc/default/webcit; then
                . /etc/default/webcit
	else
                export WEBCIT_CITADEL_IP=127.0.0.1
                export WEBCIT_CITADEL_PORT=504
	fi

	db_get citadel/WebcitApacheIntegration && WWWTYPE="$RET"
	if test "$WWWTYPE" = "Internal"; then
		export WEBCIT_APACHEFLAG=" "
		export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-0.0.0.0}
	else
		export WEBCIT_APACHEFLAG="-f"
		export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-127.0.0.1}
	fi
	
	db_get citadel/WebcitHttpPort && export WEBCIT_HTTP_PORT=$RET
	db_get citadel/WebcitHttpsPort && export WEBCIT_HTTPS_PORT=$RET
	db_get citadel/WebcitOfferLang && export WEBCIT_LANG=$RET

	db_stop
	
	set |grep WEBCIT |sed "s;^;export ;;" >/etc/default/webcit

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

	
# update the webserver, if needed
	case "$WWWTYPE" in
	    "Apache")
		webservers="apache" 
		aenmod proxy||true
		;;
	    "Apache-SSL")
		webservers="apache-ssl" 
		;;
	    "Apache2")
		webservers="apache2"
		a2enmod proxy||true
		a2enmod proxy_http||true
		;;
	    "All")
		webservers="apache apache-ssl apache2" 
		;;
	    *)
		webservers="" 
		;;
	esac
	for server in $webservers; do
	    if [ -d "/etc/${server}/conf.d" ]; then
		if [ ! -e "/etc/${server}/conf.d/webcit.conf" ] ; then
		    ln -sf /etc/citadel/webcit.conf "/etc/${server}/conf.d/webcit.conf"
                fi
                invoke-rc.d $server reload || true
	    fi
	done
    ;;
  abort-upgrade|abort-remove|abort-deconfigure)
    ;;
  *) echo "$0: didn't understand being called with '$1'" 1>&2
     exit 1;;
esac

exit 0