This file is indexed.

postinst is in freeipa-server 4.3.1-0ubuntu1.

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
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/bin/sh
set -e

if [ "$1" = configure ]; then
    if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
        . /usr/share/apache2/apache2-maintscript-helper
	if [ ! -e /etc/apache2/mods-enabled/auth_gssapi.load ]; then
            apache2_invoke enmod auth_gssapi || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/authz_user.load ]; then
            apache2_invoke enmod authz_user || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/deflate.load ]; then
            apache2_invoke enmod deflate || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/expires.load ]; then
            apache2_invoke enmod expires || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/headers.load ]; then
            apache2_invoke enmod headers || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/proxy.load ]; then
            apache2_invoke enmod proxy || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/proxy_ajp.load ]; then
            apache2_invoke enmod proxy_ajp || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/proxy_http.load ]; then
            apache2_invoke enmod proxy_http || exit $?
        fi
	if [ ! -e /etc/apache2/mods-enabled/rewrite.load ]; then
            apache2_invoke enmod rewrite || exit $?
        fi
    fi

    # check if IPA is set up
    is_configured=`python2 -c 'from ipaserver.install import installutils; print "yes" if installutils.is_ipa_configured() else "no";'`
    if [ $is_configured = yes ]; then
        echo "Running ipa-server-upgrade..."
        ipa-server-upgrade --quiet >/dev/null
    fi
fi

if [ ! -e /run/ipa_memcached ]; then
    mkdir -m 0700 /run/ipa_memcached
    chown www-data:www-data /run/ipa_memcached
fi

if [ ! -e /run/apache2/ipa ]; then
    mkdir -m 0700 /run/apache2/ipa
    chown www-data:www-data /run/apache2/ipa

    if [ ! -e /run/apache2/ipa/clientcaches ]; then
        mkdir -m 0700 /run/apache2/ipa/clientcaches
        chown www-data:www-data /run/apache2/ipa/clientcaches
    fi
    if [ ! -e /run/apache2/ipa/krbcache ]; then
        mkdir -m 0700 /run/apache2/ipa/krbcache
        chown www-data:www-data /run/apache2/ipa/krbcache
    fi
fi

# Automatically added by dh_systemd_enable
if deb-systemd-helper debian-installed ipa.service; then
	# This will only remove masks created by d-s-h on package removal.
	deb-systemd-helper unmask ipa.service >/dev/null || true

	if deb-systemd-helper --quiet was-enabled ipa.service; then
		# Create new symlinks, if any.
		deb-systemd-helper enable ipa.service >/dev/null || true
	fi
fi

# Update the statefile to add new symlinks (if any), which need to be cleaned
# up on purge. Also remove old symlinks.
deb-systemd-helper update-state ipa.service >/dev/null || true
# End automatically added section
# Automatically added by dh_systemd_enable
if deb-systemd-helper debian-installed ipa_memcached.service; then
	# This will only remove masks created by d-s-h on package removal.
	deb-systemd-helper unmask ipa_memcached.service >/dev/null || true

	if deb-systemd-helper --quiet was-enabled ipa_memcached.service; then
		# Create new symlinks, if any.
		deb-systemd-helper enable ipa_memcached.service >/dev/null || true
	fi
fi

# Update the statefile to add new symlinks (if any), which need to be cleaned
# up on purge. Also remove old symlinks.
deb-systemd-helper update-state ipa_memcached.service >/dev/null || true
# End automatically added section
# Automatically added by dh_systemd_enable
if deb-systemd-helper debian-installed ipa-dnskeysyncd.service; then
	# This will only remove masks created by d-s-h on package removal.
	deb-systemd-helper unmask ipa-dnskeysyncd.service >/dev/null || true

	if deb-systemd-helper --quiet was-enabled ipa-dnskeysyncd.service; then
		# Create new symlinks, if any.
		deb-systemd-helper enable ipa-dnskeysyncd.service >/dev/null || true
	fi
fi

# Update the statefile to add new symlinks (if any), which need to be cleaned
# up on purge. Also remove old symlinks.
deb-systemd-helper update-state ipa-dnskeysyncd.service >/dev/null || true
# End automatically added section
# Automatically added by dh_systemd_enable
if deb-systemd-helper debian-installed ipa-custodia.service; then
	# This will only remove masks created by d-s-h on package removal.
	deb-systemd-helper unmask ipa-custodia.service >/dev/null || true

	if deb-systemd-helper --quiet was-enabled ipa-custodia.service; then
		# Create new symlinks, if any.
		deb-systemd-helper enable ipa-custodia.service >/dev/null || true
	fi
fi

# Update the statefile to add new symlinks (if any), which need to be cleaned
# up on purge. Also remove old symlinks.
deb-systemd-helper update-state ipa-custodia.service >/dev/null || true
# End automatically added section
# Automatically added by dh_systemd_enable
if deb-systemd-helper debian-installed ipa-ods-exporter.service; then
	# This will only remove masks created by d-s-h on package removal.
	deb-systemd-helper unmask ipa-ods-exporter.service >/dev/null || true

	if deb-systemd-helper --quiet was-enabled ipa-ods-exporter.service; then
		# Create new symlinks, if any.
		deb-systemd-helper enable ipa-ods-exporter.service >/dev/null || true
	fi
fi

# Update the statefile to add new symlinks (if any), which need to be cleaned
# up on purge. Also remove old symlinks.
deb-systemd-helper update-state ipa-ods-exporter.service >/dev/null || true
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	# In case this system is running systemd, we need to ensure that all
	# necessary tmpfiles (if any) are created before starting.
	if [ -d /run/systemd/system ] ; then
		systemd-tmpfiles --create /usr/lib/tmpfiles.d/freeipa-server.conf >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
	systemctl --system daemon-reload >/dev/null || true
	deb-systemd-invoke start ipa-custodia.service ipa-dnskeysyncd.service ipa-ods-exporter.service ipa-ods-exporter.socket ipa-otpd.socket ipa.service ipa_memcached.service >/dev/null || true
fi
# End automatically added section