X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=php-suhosin-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;fp=debian%2Fpostinst;h=2fccdb03615762e701d8f139b37fe35059144cd9;hp=0000000000000000000000000000000000000000;hb=120f64e939c7b1f89ff8f0e12a25cdaf67463497;hpb=d7bbc770feda808c0f3fcd04e4c57f4508e6a5dd diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..2fccdb0 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,70 @@ +#!/bin/sh +# postinst script for proftpd-cn +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure|reconfigure) + # continue below + ;; + + *) + exit 0 + ;; +esac + +# Import CN toolsa +. /usr/share/carnet-tools/functions.sh + +CONF=/etc/php5/conf.d/suhosin.ini + +if [ -e "$CONF" ]; then + echo "CN: Enabling Suhosin tuneups" + cp -a "$CONF" "$CONF.$$" + cp-update --comment ';' php-suhosin-cn "$CONF.$$" </dev/null; then + echo "CN: Reloading Apache..." + invoke-rc.d apache2 force-reload || true +else + echo "CN: Your Apache2 configuration is either broken or nonexistant" +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0