This file is indexed.

postinst is in evqueue-core 2.0-1build1.

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
#!/bin/bash

set -e

if [ "$1" = "configure" ]; then
	if ! getent group evqueue > /dev/null 2>&1 ; then
		addgroup --system --quiet evqueue
	fi
	
	if ! getent passwd evqueue > /dev/null 2>&1 ; then
		adduser --quiet --system --disabled-login --ingroup evqueue --home /var/run/evqueue/ --no-create-home evqueue
	fi
	
	chown -R evqueue:evqueue /usr/share/evqueue-core
	
	. /usr/share/debconf/confmodule
	db_get evqueue-core/hostname
	sed --in-place -e "s/#\?[ ]*mysql.host[ ]*=.*/mysql.host=$RET/" /etc/evqueue.conf

	db_get evqueue-core/user
	sed --in-place -e "s/#\?[ ]*mysql.user[ ]*=.*/mysql.user=$RET/" /etc/evqueue.conf

	db_get evqueue-core/password
	sed --in-place -e "s/#\?[ ]*mysql.password[ ]*=.*/mysql.password=$RET/" /etc/evqueue.conf

	db_get evqueue-core/database
	sed --in-place -e "s/#\?[ ]*mysql.database[ ]*=.*/mysql.database=$RET/" /etc/evqueue.conf
	
	service rsyslog restart
fi

# Automatically added by dh_installinit/10.10.7ubuntu2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/evqueue" ]; then
		update-rc.d evqueue defaults >/dev/null
		if [ -n "$2" ]; then
			_dh_action=restart
		else
			_dh_action=start
		fi
		invoke-rc.d evqueue $_dh_action || exit $?
	fi
fi
# End automatically added section