This file is indexed.

postinst is in jsmath 3.6c-1.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
#!/bin/sh
#
# jsmath postinst script, based on gallery's postinst. Since it was
# simplified to make it lintian quiet, it can be reorganized to make
# it much shorter. But I kept original layout in case if I decide to
# revert to the way gallery handles server restarts #
# -- yoh

set -e

. /usr/share/debconf/confmodule


if [ "$1" = "configure" ]; then

    db_get jsmath/webserver
    webservers="$RET"
    restart=""

    for webserver in $webservers; do
        webserver=${webserver%,}
        test -x /usr/sbin/$webserver || continue

        case "$webserver" in
            apache|apache-perl|apache-ssl|apache2)
	    	test -d /etc/$webserver/conf.d || continue
                if [ ! -f /etc/$webserver/conf.d/jsmath -a ! -h /etc/$webserver/conf.d/jsmath ]; then
                    ln -s /etc/jsmath/apache.conf /etc/$webserver/conf.d/jsmath
                fi
                db_get jsmath/restart
                if [ "$RET" = "true" ]; then
                    restart="$restart $webserver"
                fi
                ;;
        esac
    done

    db_stop

    for webserver in $restart; do
        webserver=${webserver%,}
        if [ -x /usr/sbin/invoke-rc.d ]; then
            invoke-rc.d $webserver restart
        else
            /etc/init.d/$webserver restart
        fi
    done
fi