This file is indexed.

postinst is in dante-server 1.4.2+dfsg-2build1.

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

set -e

dante_service_error()
{
	local res="$?" conffile='/etc/danted.conf' notfound='' var
	for var in internal external; do
		if ! egrep -qe '^[[:space:]]*'"$var"'[[:space:]]*:' -- "$conffile"; then
			notfound="$notfound $var"
		fi
	done
	if [ -n "$notfound" ]; then
		echo "Please edit the Dante server config file $conffile and specify at least the following directives:$notfound" 1>&2
	else
		# The required directives are specified, so propagate the error
		exit "$res"
	fi
}

# Automatically added by dh_installinit/11.1.4ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/danted" ]; then
		update-rc.d danted defaults >/dev/null
		if [ -n "$2" ]; then
			_dh_action=restart
		else
			_dh_action=start
		fi
		invoke-rc.d danted $_dh_action || dante_service_error
	fi
fi
# End automatically added section