This file is indexed.

postinst is in icecc 0.9.7-4ubuntu1.

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
#!/bin/sh -e
# postinst script for icecc

set -e

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

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

# source debconf stuff
. /usr/share/debconf/confmodule
db_version 2.0

# generate configuration file
echo "# Defaults for icecc initscript" > $CONFIGFILE
echo "# sourced by /etc/init.d/icecc" >> $CONFIGFILE
echo "START_ICECC=" >> $CONFIGFILE
echo "START_ICECC_SCHEDULER=" >> $CONFIGFILE

# retrieve various configuration options from debconf
db_get icecc/daemon
START_ICECC="$RET"

db_get icecc/scheduler
START_ICECC_SCHEDULER="$RET"

# done with debconf
db_stop

cp -a -f $CONFIGFILE $CONFIGFILE.tmp

sed -e "s/^ *START_ICECC=.*/START_ICECC=\"$START_ICECC\"/" \
    -e "s/^ *START_ICECC_SCHEDULER=.*/START_ICECC_SCHEDULER=\"$START_ICECC_SCHEDULER\"/" \
    < $CONFIGFILE > $CONFIGFILE.tmp

mv -f $CONFIGFILE.tmp $CONFIGFILE

# 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

# Automatically added by dh_installinit
if [ -x "/etc/init.d/icecc" ]; then
	if [ ! -e "/etc/init/icecc.conf" ]; then
		update-rc.d icecc defaults >/dev/null
	fi
	invoke-rc.d icecc start || exit $?
fi
# End automatically added section


exit 0