File: libhtml-mason-perl-examples.config

package info (click to toggle)
libhtml-mason-perl 1%3A1.39-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,072 kB
  • ctags: 1,535
  • sloc: perl: 17,624; sh: 187; makefile: 12
file content (47 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download | duplicates (3)
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
#!/bin/bash -e

dc_true() {
    db_get "$1"
    [ "$RET" = "true" ]
}

. /usr/share/debconf/confmodule

found_apache1="no"
found_existing="no"

for variant in "" "perl" "ssl"; do

APACHE_CONF_DIR=/etc/apache${variant:+-${variant}}/conf.d
APACHE_CONF_FRAGMENT=$APACHE_CONF_DIR/libhtml-mason-perl-examples.conf
APACHE_CTL=/usr/sbin/apache${variant:+-${variant}}ctl

if [ -d $APACHE_CONF_DIR -a -x $APACHE_CTL ]; then
    found_apache1="yes"
    if [ -f $APACHE_CONF_FRAGMENT ]; then
	found_existing="yes"
    fi
fi

done

APACHE2_CONF_DIR=/etc/apache2/conf.d
APACHE2_CONF_FRAGMENT=$APACHE2_CONF_DIR/libhtml-mason-perl-examples.conf
APACHE2_CTL=/usr/sbin/apache2ctl

if [ -d $APACHE2_CONF_DIR -a -x $APACHE2_CTL ]; then
    found_apache2="yes"
    if [ -f $APACHE2_CONF_FRAGMENT ]; then
	found_existing="yes"
    fi
fi

if [ "$found_apache1" = "yes" -o "$found_apache2" = "yes" ]; then
    db_input medium libhtml-mason-perl/install_examples || true
    db_go || true
    if [ "$found_existing" = "yes" ] || dc_true libhtml-mason-perl/install_examples; then
	db_input medium libhtml-mason-perl/auto_restart_apache || true
    fi
fi

db_go || true