File: libembperl-perl.postinst

package info (click to toggle)
libembperl-perl 2.5.0-10%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,128 kB
  • sloc: ansic: 21,384; perl: 14,496; javascript: 4,280; cpp: 467; xml: 49; makefile: 33; sh: 24
file content (24 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -e

#DEBHELPER#

if [ "$1" = "configure" ]; then
    if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
        . /usr/share/apache2/apache2-maintscript-helper

        # mod_embperl is not thread-safe, requires the prefork MPM
        if [ $(a2query -M) != 'prefork' ] ; then
            if apache2_switch_mpm prefork ; then
                apache2_invoke enmod zembperl
            else
                apache2_msg err "Could not switch to prefork, not enabling mod_embperl (you must use cgi or offline mode to use Embperl)"
            fi
        else
            apache2_invoke enmod zembperl
        fi
    fi
fi

exit 0