This file is indexed.

postinst is in tumgreyspf 1.36-4.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
#!/bin/sh

set -e

GETENT=/usr/bin/getent
TUMUSER=tumgreyspf

if ${GETENT} passwd ${TUMUSER} >/dev/null ; then
	echo "User ${TUMUSER} already exists: skipping creation!"
else
	if [ -x `which useradd` ] ; then
		useradd -m -s /bin/false -g nogroup ${TUMUSER} -r -b /var/lib
		echo "Created user ${TUMUSER}"
	else
		echo "Could not find the useradd binary!"
		exit 1
	fi
fi
if [ -x `which usermod` ] ; then
	usermod -d /var/lib/tumgreyspf ${TUMUSER}
fi

chown ${TUMUSER} /var/lib/tumgreyspf
chown -R ${TUMUSER} /var/lib/tumgreyspf/config
chown ${TUMUSER} /var/lib/tumgreyspf/data
chown ${TUMUSER} /var/lib/tumgreyspf/test
chown ${TUMUSER} /var/lib/tumgreyspf/test/data

# Clean up the old /etc/cron.d/tumgreyspdf if it hasn't been modified,
# and replace by the new /etc/cron.daily/tumgreyspf
if [ -f /etc/cron.d/tumgreyspf ] ; then
	MYMD5=`md5sum /etc/cron.d/tumgreyspf | cut -d" " -f1`
	if [ "${MYMD5}" = "24ea9c78656d84da9d734407d8fcd82b" ] ; then
		echo "/etc/cron.d/tumgreyspdf has been replaced by /etc/cron.daily/tumgreyspf;"
		echo "the old file has been deleted."
		rm -f /etc/cron.d/tumgreyspf
	else
		echo "WARNING: there is an old /etc/cron.d/tumgreyspf file, but since it has"
		echo "been modified, it wont be deleted automaticaly. Please proceed to its"
		echo "deletion by hand if you don't need it anymore."
	fi
fi



exit 0