This file is indexed.

postinst is in mono-apache-server2 2.10-1build1.

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
#!/bin/sh
set -e

. /usr/share/debconf/confmodule
db_version 2.0

modmono_default="/etc/default/mono-apache-server2"

restart_apache_on() {
    sed s/start_apache=false/start_apache=true/g $modmono_default > $tempfile
    cp $tempfile $modmono_default
}

restart_apache_off() {
    sed s/start_apache=true/start_apache=false/g $modmono_default > $tempfile
    cp $tempfile $modmono_default
}

daemon_turn_off() {
    if [ -x /etc/init.d/mono-server2 ]; then
	update-rc.d -f mono-server2 remove > /dev/null
    fi
}

case "$1" in
    configure)
	tempfile=$(/bin/tempfile)
	
	db_get monoserver2/monoserver2_restartapache || true
	daemon_turn_off
	if [ "$RET" = "true" ]; then
	    restart_apache_on
	else
	    restart_apache_off
	fi

	mono-server2-update
	rm $tempfile
	;;
esac



exit 0