This file is indexed.

postinst is in icecc 1.0.1-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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh -e
# postinst script for icecc

set -e

if test "$1" = triggered; then
    invoke-rc.d iceccd restart
    exit 0
fi

# configure some variables
ICECC_GROUP=icecc
ICECC_USER=icecc
ICECC_HOME=/var/cache/icecc

# create group
grep -q $ICECC_GROUP /etc/group || ( echo Creating $ICECC_GROUP group... ; \
addgroup --quiet --system $ICECC_GROUP)

# create user
grep -q $ICECC_USER /etc/passwd || ( echo Creating $ICECC_USER user... ; \
adduser --quiet --system --ingroup $ICECC_GROUP \
--home $ICECC_HOME --no-create-home $ICECC_USER )

chown $ICECC_USER:$ICECC_GROUP $ICECC_HOME

if [ -x "/etc/init.d/icecc-scheduler" ]; then
        update-rc.d icecc-scheduler defaults >/dev/null
        # disable icecc-scheduler either when upgrading from < 1.0.0, or when
        # doing a new installation
        if test -z "$2" || dpkg --compare-versions "$2" lt "1.0.0-1~"; then
                update-rc.d icecc-scheduler disable >/dev/null || exit $?
        fi
fi

if [ "$1" = "configure" ]; then
        if test -n "$2" && dpkg --compare-versions "$2" lt "1.0.0-1~"; then
                # unregister the old init script
                update-rc.d icecc remove >/dev/null
                if [ -e /etc/default/icecc ]; then
                        # move away the old /etc/defaults/icecc; since the
                        # old version was modified in postinst, it cannot
                        # be removed by looking at its md5sum
                        echo "Moving obsolete conffile /etc/default/icecc out of the way..."
                        mv -f "/etc/default/icecc" "/etc/default/icecc.dpkg-bak"
                fi
                # cleanup the old debconf keys
                if [ -e /usr/share/debconf/confmodule ]; then
                        . /usr/share/debconf/confmodule
                        db_purge
                        # done with debconf
                        db_stop
                fi
        fi
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/iceccd" ] || [ -e "/etc/init/iceccd.conf" ]; then
	if [ ! -e "/etc/init/iceccd.conf" ]; then
		update-rc.d iceccd defaults >/dev/null
	fi
	invoke-rc.d iceccd start || exit $?
fi
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/init.d/icecc 1.0.0-1~ icecc -- "$@"
# End automatically added section


exit 0