File: flavours.postinst

package info (click to toggle)
apache 1.3.34-4.1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 4,800 kB
  • ctags: 90
  • sloc: sh: 1,273; makefile: 685; perl: 215
file content (70 lines) | stat: -rw-r--r-- 1,454 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /bin/bash

set -e

@INCLUDE@

# Main body

# Load debconf so that our .config script gets run.
. /usr/share/debconf/confmodule

. /usr/share/apache/postinst.common

if [ "$1" != configure ]
then
    exit 0
fi


HIDE=
if [ "$2" != "" ]
then
    UPGRADE=true
    if dpkg --compare-versions $2 ge 1.3.28-1; then
    	HIDE=quiet
    fi
    if dpkg --compare-versions $2 lt 1.3.27-0.1; then
	UPGRADEFROMWOODY=true
    fi
    if dpkg --compare-versions $2 eq @APACHEMAJOR@@APACHEMINOR@-@DEBREVISION@; then
    	HIDE=
    fi
    if dpkg --compare-versions $2 ge 1.3.29.0.1-1; then
	if [ -e /etc/@FLAVOUR@/suexec.limits ]; then
	    if [ "`md5sum /etc/@FLAVOUR@/suexec.limits | awk '{print $1}'`" = "5d8149cb6ff1082ef280c05c09eba793" ]; then
	        rm -f /etc/@FLAVOUR@/suexec.limits
	    fi
	fi
    fi
else
    UPGRADE=false
fi

/usr/sbin/apache-modconf @FLAVOUR@ internal $HIDE

if [ "$UPGRADE" != "true" ]; then
    add_webmaster_alias
fi
 
do_all @FLAVOUR@

db_stop

# this is some sort of hack since we only have dh_installinit down there

# we need to restore the status only if the user decide not to start
# apache at boot, otherwise debhelper will take care of it.
if [ -e /etc/@FLAVOUR@/.@FLAVOUR@mustberestarted ]; then
     rm -f /etc/@FLAVOUR@/.@FLAVOUR@mustberestarted
    /etc/init.d/@FLAVOUR@ start || exit 0
fi

if [ "$start_at_boot" = "false" ]; then
    update-rc.d -f @FLAVOUR@ remove > /dev/null 2>&1
    exit 0
fi

#DEBHELPER#

exit 0