This file is indexed.

postinst is in mediawiki 1:1.19.14+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
#! /bin/sh
# postinst script for mediawiki
#
# see: dh_installdeb(1)

set -e

. /usr/share/debconf/confmodule

case "$1" in
    configure)

	php5enmod mediawiki

        db_get mediawiki/webserver || true
	webserver=$RET

	webserver=`echo $webserver|sed -e 's/,  */ /g'`

	for i in $webserver; do
	    if [ "$webserver" != "cherokee" ]; then
		if [ "$webserver" = "apache2" ]; then
			dst=/etc/apache2/conf-available
		else
			dst=/etc/$i/conf.d
		fi
		if [ ! -d $dst/ ]; then
			install -d -m755 $dst/
		fi
		if [ "$webserver" = "apache2" ]; then
			if [ -e /etc/$i/conf.d/mediawiki.conf ]; then
				mv /etc/$i/conf.d/mediawiki.conf $dst/
			fi
		fi
		if [ ! -e $dst/mediawiki.conf ]; then
			ln -s /etc/mediawiki/apache.conf \
			$dst/mediawiki.conf
			if [ -f /etc/init.d/$i ]; then
				if which invoke-rc.d >/dev/null 2>&1; then
                			invoke-rc.d $i reload
        			else
                			/etc/init.d/$i reload
        			fi
			fi
		fi
	     else
		if [ ! -d /etc/cherokee/sites-available/ ]; then
			install -d -m755 /etc/cherokee/sites-available/
		fi
		if [ ! -e /etc/cherokee/sites-available/mediawiki ]; then
			ln -s /etc/mediawiki/cherokee.conf \
			/etc/cherokee/sites-available/mediawiki
			if [ -f /etc/init.d/$i ]; then
				if which invoke-rc.d >/dev/null 2>&1; then
                			invoke-rc.d $i reload
        			else
                			/etc/init.d/$i reload
        			fi
			fi
		fi
	     fi
	done

        #chown -R www-data:www-data /var/lib/mediawiki/config /var/lib/mediawiki/images
        chown -R www-data:www-data /var/lib/mediawiki/cache /var/lib/mediawiki/images
        #chmod 700 /var/lib/mediawiki/config /var/lib/mediawiki/images
        chmod 700 /var/lib/mediawiki/cache /var/lib/mediawiki/images

    ;;
    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0