2 # postinst script for proftpd-cn
4 # see: dh_installdeb(1)
8 # summary of how this script can be called:
9 # * <postinst> `configure' <most-recently-configured-version>
10 # * <old-postinst> `abort-upgrade' <new version>
11 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
13 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
14 # <failed-install-package> <version> `removing'
15 # <conflicting-package> <version>
16 # for details, see http://www.debian.org/doc/debian-policy/ or
17 # the debian-policy package
21 configure|reconfigure)
31 . /usr/share/carnet-tools/functions.sh
33 CONF=/etc/php5/mods-available/apc.ini
35 if [ -e "$CONF" ]; then
36 echo "CN: Enabling CARNet APC modifications"
37 cp -a "$CONF" "$CONF.$$"
38 cp-update --comment ';' php-apc-cn "$CONF.$$" <<EOF
41 apc.include_once_override=0
45 apc.num_files_hint=1024
46 apc.mmap_file_mask=/tmp/apc.XXXXXX
50 cp_mv "$CONF.$$" "$CONF"
52 echo "CN: $CONF not found, not enabling CARNet APC modifications"
56 if apache2ctl configtest 2>/dev/null; then
57 echo "CN: Reloading Apache..."
58 invoke-rc.d apache2 force-reload || true
60 echo "CN: Your Apache2 configuration is either broken or nonexistant"
63 # dh_installdeb will replace this with shell code automatically
64 # generated by other debhelper scripts.