summaryrefslogtreecommitdiff
path: root/debian/php5-module.postinst
blob: 5244d6dc17f37af9bfee96fa0ef294e5c392ea23 (plain)
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
#!/bin/sh

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

#DEBHELPER#

if [ "$1" != "configure" ]; then
	exit 0
fi

for SAPI in apache apache2 cgi cli
do
	if [ -f /etc/php5/$SAPI/php.ini ]; then
		db_get php5/extension_@dsoname@_$SAPI
		if [ "$RET" = "true" ] \
		   && ! grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*@dsoname@\.so" /etc/php5/$SAPI/php.ini
		then
			echo "extension=@dsoname@.so" >> /etc/php5/$SAPI/php.ini
		fi
	fi
done

exit 0