Promjena 64 -> 64M u varijabli "apc.shm_size"
[php-apc-cn.git] / debian / postinst
1 #!/bin/sh
2 # postinst script for proftpd-cn
3 #
4 # see: dh_installdeb(1)
5
6 set -e
7
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>
12 #          <new-version>
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
18 #
19
20 case "$1" in
21     configure|reconfigure)
22       # continue below
23     ;;
24
25     *)
26         exit 0
27     ;;
28 esac
29
30 # Import CN toolsa
31 . /usr/share/carnet-tools/functions.sh
32
33 CONF=/etc/php5/conf.d/apc.ini
34
35 if [ -e "$CONF" ]; then
36     echo "CN: Enabling APC tuneups"
37     cp -a "$CONF" "$CONF.$$"
38     cp-update --comment ';' php-apc-cn "$CONF.$$" <<EOF
39 apc.enabled=1
40 apc.shm_size=64M
41 apc.include_once_override=0
42 apc.shm_segments=1
43 apc.ttl=7200
44 apc.user_ttl=7200
45 apc.num_files_hint=1024
46 apc.mmap_file_mask=/tmp/apc.XXXXXX
47 apc.enable_cli=1
48 apc.max_file_size=10M
49 EOF
50     cp_mv "$CONF.$$" "$CONF"
51 fi
52
53 # reload Apache
54 if apache2ctl configtest 2>/dev/null; then
55     echo "CN: Reloading Apache..."
56     invoke-rc.d apache2 force-reload || true
57 else
58     echo "CN: Your Apache2 configuration is either broken or nonexistant"
59 fi
60
61 # dh_installdeb will replace this with shell code automatically
62 # generated by other debhelper scripts.
63
64 #DEBHELPER#
65
66 exit 0