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/conf.d/suhosin.ini
35 if [ -e "$CONF" ]; then
36 echo "CN: Enabling Suhosin tuneups"
37 cp -a "$CONF" "$CONF.$$"
38 cp-update --comment ';' php-suhosin-cn "$CONF.$$" <<EOF
39 suhosin.cookie.max_name_length=1024
40 suhosin.cookie.max_vars=1024
41 suhosin.get.max_array_depth=1024
42 suhosin.get.max_name_length=1024
43 suhosin.get.max_value_length=307200
44 suhosin.get.max_vars=1024
45 suhosin.post.max_array_depth=1024
46 suhosin.post.max_name_length=1024
47 suhosin.post.max_value_length=307200
48 suhosin.post.max_vars=1024
49 suhosin.request.max_array_depth=1024
50 suhosin.request.max_value_length=307200
51 suhosin.request.max_varname_length=1024
52 suhosin.request.max_vars=1024
54 cp_mv "$CONF.$$" "$CONF"
58 if apache2ctl configtest 2>/dev/null; then
59 echo "CN: Reloading Apache..."
60 invoke-rc.d apache2 force-reload || true
62 echo "CN: Your Apache2 configuration is either broken or nonexistant"
65 # dh_installdeb will replace this with shell code automatically
66 # generated by other debhelper scripts.