1 #!/bin/sh 2 3 set -e 4 5 #EXTRA# 6 #DEBHELPER# 7 8 if [ -d "/etc/php5/mods-available" ]; then 9 inidir=/etc/php5/mods-available/ 10 else 11 inidir=/etc/php5/conf.d/ 12 fi 13 14 module=kolab 15 package=php-${module} 16 inifile=${module}.ini 17 18 dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/${inifile} ${inidir}/${inifile} 0.3.0~ -- "$@"; 19 20 # Query which package has this conffile registered 21 if which ucfq >/dev/null; then 22 ucfp=$(ucfq -w ${inidir}/${inifile} | cut -f 2 -d:) 23 fi 24 25 # Only work with the config file if it still belongs to us 26 if test "$ucfp" = ${package}; then 27 if [ "$1" = "purge" ]; then 28 for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do 29 rm -f ${inidir}/${inifile}${ext} 30 done 31 32 rm -f ${inidir}/${inifile} 33 34 if which ucf >/dev/null; then 35 ucf --purge ${inidir}/${inifile} 36 fi 37 38 if which ucfr >/dev/null; then 39 ucfr --purge ${package} ${inidir}/${inifile} 40 fi 41 fi 42 fi 43 44 exit 0