This file is indexed.

preinst is in cherokee 1.2.101-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
# preinst script for Cherokee
#
# see: dh_installdeb(1)

set -e

action=$1
version=$2

case "$action" in
    install|upgrade)
	CONFPATH=/etc/cherokee
	CONFFILE=$CONFPATH/cherokee.conf

	# If the conffile has an unmodified md5sum, skip all the rest of the
	# processing; dpkg conffile upgrading will already do what we need.
	if [ -e "$CONFFILE" ]; then
		md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
		old_md5sum="`dpkg-query -W -f='${Conffiles}' cherokee | sed -n -e \"\\\\' $CONFFILE[[:space:]]'{s/ obsolete$//;s/.* //p}\"`"
	fi

	if [ -e "$CONFFILE" ] && [ "$md5sum" != "$old_md5sum" ]; then
	    # Finally, starting 0.99.31, there is just a generic migrator
	    # able to do it all. We will deprecate older migrators soon.
	    if [ -x /usr/share/cherokee/admin/upgrade_config.py ]; then
		/usr/share/cherokee/admin/upgrade_config.py $CONFFILE
	    else
		echo "To auto-upgrade the Cherokee configuration, you need"
		echo "to install the cherokee-admin package."
		echo "Continuing with the existing installation."
	    fi
	fi
	;;
    abort-upgrade)
	;;
    *)
        echo "preinst called with unknown argument \`$action'" >&2
        exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0