File: php4-mcrypt.postinst

package info (click to toggle)
php4-mcrypt 3%3A4.3.10-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,032 kB
  • ctags: 186
  • sloc: sh: 8,424; ansic: 1,273; makefile: 88; awk: 70
file content (26 lines) | stat: -rw-r--r-- 474 bytes parent folder | download
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 caudium
do
	if [ -f /etc/php4/$SAPI/php.ini ]; then
		db_get php4/extension_mcrypt_$SAPI
		if [ "$RET" = "true" ] \
		   && ! grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*mcrypt.so" /etc/php4/$SAPI/php.ini
		then
			echo "extension=mcrypt.so" >> /etc/php4/$SAPI/php.ini
		fi
	fi
done

exit 0