This file is indexed.

postinst is in cereal 0.24-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
#!/bin/sh -e

# postinst script for cereal

# Author: Jameson Graef Rollins <jrollins@finestructure.net> and 
#         Daniel Kahn Gillmor <dkg@fifthhorseman.net>
# (c) 2007

if ! getent passwd cereal >/dev/null ; then
    echo "adding cereal user..."
    adduser --quiet --system --no-create-home --home '/var/lib/cereal' --shell '/bin/false' --gecos 'cereal logfile owner,,,' cereal
fi

# apply some needed upgrades to existing sessions
for session in $(cereal list | cut -d ' ' -f 2) ; do

    # add the 'down' file to all stopped sessions
    if cereal list "$session" | grep -q '^-' ; then
	touch /var/lib/cereal/sessions/"$session"/down
    fi

    # make sure all sessions have the finish script
    # added for version 0.22
    ln -sf /usr/share/cereal/finish /var/lib/cereal/sessions/"$session"/finish

done

# restart all running sessions
cereal-admin restart --running

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



exit 0