postinst is in php5-ps 1.3.6-6.
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 | #!/bin/sh -e
PECL_NAME=ps
PHP_VERSION=5
if [ "$DPKG_DEBUG" = "developer" ]; then
set -x
fi
if [ "$1" != "configure" ]; then
exit 0
fi
if [ "$2" ] && dpkg --compare-versions "$2" lt "1.3.4-3"; then
extension_re="^[[:space:]]*extension[[:space:]]*=[[:space:]]*${PECL_NAME}\.so"
for SAPI in apache2 apache cgi cli; do
ini_file="/etc/php${PHP_VERSION}/$SAPI/php.ini"
if [ -f "$ini_file" ]; then
if grep -q "$extension_re" "$ini_file"; then
sed -i -e "/$extension_re/d" "$ini_file"
fi
fi
done
fi
##
exit 0
|