preinst 800 Bytes
Newer Older
Piotr Gawron's avatar
Piotr Gawron committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# preinst script for minerva
#
# summary of how this script can be called:
#        * <new-preinst> `install'
#        * <new-preinst> `install' <old-version>
#        * <new-preinst> `upgrade' <old-version>
#        * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

log "Running preinst" $1 $2;

# we execute it here because if some packages are missing then dpkg will return non-zero exit code
set -e

case "$1" in
    install|upgrade)
19
20
	invoke-rc.d $TOMCAT_PACKAGE stop || true
	stop_postgres
Piotr Gawron's avatar
Piotr Gawron committed
21
22
    ;;
    abort-upgrade)
23
24
	invoke-rc.d $TOMCAT_PACKAGE stop || true
	stop_postgres
Piotr Gawron's avatar
Piotr Gawron committed
25
26
27
28
29
30
31
32
33
34
    ;;
    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0