This file is indexed.

postinst is in timidity-daemon 2.13.2-40build2.

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
71
72
73
74
75
76
77
78
#!/bin/sh
set -e

case "$1" in
configure)

[ -f "/etc/default/timidity" ] && . /etc/default/timidity

# Sane defaults, needed for when the user has messed with /etc/default/timidity:

[ -z "$SERVER_HOME" ] && SERVER_HOME=/etc/timidity
[ -z "$SERVER_USER" ] && SERVER_USER=timidity
[ -z "$SERVER_NAME" ] && SERVER_NAME="TiMidity++ MIDI sequencer service"
[ -z "$SERVER_GROUP" ] && SERVER_GROUP=timidity

# Groups that the user will be added to, if undefined, then none.
[ -z "$ADDGROUP" ] && ADDGROUP=audio

# create user to avoid running server as root
# 1. create group if not existing
if ! getent group | grep -q "^$SERVER_GROUP:" ; then
echo -n "Adding group $SERVER_GROUP.."
addgroup --quiet --system $SERVER_GROUP 2>/dev/null ||true
echo "..done"
fi
# 2. create user if not existing
if ! getent passwd | grep -q "^$SERVER_USER:"; then
echo -n "Adding system user $SERVER_USER.."
adduser --quiet \
            --system \
            --ingroup $SERVER_GROUP \
            --no-create-home \
            --disabled-password \
            $SERVER_USER 2>/dev/null || true
echo "..done"
fi
# 3. adjust passwd entry
usermod -c "$SERVER_NAME" \
            -d $SERVER_HOME   \
            -g $SERVER_GROUP  \
            $SERVER_USER 2> /dev/null || true
# 4. Add the user to the ADDGROUP group
if test -n $ADDGROUP
   then
   if ! groups $SERVER_USER | cut -d: -f2 | \
        grep -qw $ADDGROUP; then
        adduser $SERVER_USER $ADDGROUP
   fi
fi
;;
esac

rm -f /etc/timidity/timidity.daemon

# make sure we really stop, because packaging system doesn't
# understand what we're trying to do with migration to timidity-daemon
[ -f "/etc/init.d/timidity" ] && if which invoke-rc.d >/dev/null 2>&1; then
  invoke-rc.d timidity stop
else
  /etc/init.d/timidity stop
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/timidity" ]; then
	if [ ! -e "/etc/init/timidity.conf" ]; then
		update-rc.d timidity defaults 99 01 >/dev/null
	fi
	if [ -n "$2" ]; then
		_dh_action=restart
	else
		_dh_action=start
	fi
	invoke-rc.d timidity $_dh_action || exit $?
fi
# End automatically added section


exit 0