File: icecc.postinst

package info (click to toggle)
icecc 1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,520 kB
  • sloc: cpp: 14,058; sh: 3,006; ansic: 767; xml: 744; makefile: 231; asm: 2
file content (37 lines) | stat: -rw-r--r-- 902 bytes parent folder | download | duplicates (2)
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
#!/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
getent group $ICECC_GROUP > /dev/null || ( echo Creating $ICECC_GROUP group... ; \
addgroup --quiet --system $ICECC_GROUP)

# create user
getent passwd $ICECC_USER > /dev/null || ( 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 when doing a new installation
        if test -z "$2"; then
                update-rc.d icecc-scheduler disable >/dev/null || exit $?
        fi
fi

#DEBHELPER#

exit 0