This file is indexed.

postinst is in postfix-cluebringer 2.0.10-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
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
#!/bin/sh -e

CONFIG_DIR="/etc/cluebringer"
CONFIG_FILE="/etc/cluebringer/cluebringer.conf"
LOG_FILE="/var/log/cbpolicyd.log"
RUN_DIR="/var/run/cluebringer"
LIB_DIR="/var/lib/cluebringer"
NAME="cluebringer"
INIT_FILE="/etc/init.d/postfix-cluebringer"
DAEMON="postfix-cluebringer"

. /usr/share/debconf/confmodule

case "$1" in
	configure)
		# If the logfile doesn't exist create it
		if [ ! -f $LOG_FILE ]; then
			touch $LOG_FILE > /dev/null || true
			chown $NAME:adm $LOG_FILE > /dev/null || true
			chmod 660 $LOG_FILE > /dev/null || true
		fi

		# If the directory for the PID file doesn't exist create it.
		if [ ! -d $RUN_DIR ]; then
			mkdir -p $RUN_DIR > /dev/null || true
		fi
		
		# If the directory for the default SQLite db doesn't exist create it.
		if [ ! -d $LIB_DIR ]; then
			mkdir -p $LIB_DIR > /dev/null || true
		fi
	
		# Fix perms on config directory
		#chown $NAME:$NAME $CONFIG_DIR > /dev/null || true

		#Fix Permissions on /var sub dirs.	
		chown $NAME:root $RUN_DIR > /dev/null || true
		chown $NAME:root $LIB_DIR > /dev/null || true
		chmod 770 $RUN_DIR > /dev/null || true
		chmod 770 $LIB_DIR > /dev/null || true

		update-rc.d postfix-cluebringer defaults >/dev/null || exit $?

		#ucf --debconf-ok /usr/share/doc/postfix-cluebringer/examples /etc/cluebringer
		#ucfr --debconf-ok /usr/share/doc/postfix-cluebringer/examples /etc/cluebringer
		# Verify Config is there
		if [ ! -f $CONFIG_FILE ]; then
			echo "Config file $CONFIG_FILE not found. Not attemting start of service." >&2
			exit 0;
		fi
		res=$?
		if [ $res -eq 0 ]; then
			echo "You may need to configure the database before attempting"
			echo "to start or restart the daemon. Please look into"
			echo "/usr/share/doc/postfix-cluebringer/database for"
			echo "appropriate files, and into ${CONFIG_FILE} to set"
			echo "a suitable DSN."
		fi
		exit $?

		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		;;

	*)
		echo "postinst called with unknown argument '$1'" >&2
		exit 1
		;;
esac

exit 0