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 priority=31 18 19 if [ "$1" = "configure" ]; then 20 21 # Register new conffile with UCF 22 ucf /usr/share/php5/${module}/${inifile} ${inidir}/${inifile} 23 ucfr --force ${package} ${inidir}/${inifile} 24 25 # Move pre-extension manager conffile 26 dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/${inifile} ${inidir}/${inifile} 0.4.0~ -- "$@"; 27 28 if [ -f "${inidir}/${inifile}.dpkg-new" ]; then 29 md5sum="$(md5sum ${inidir}/${inifile}.dpkg-new | sed -e 's/ .*//')" 30 old_md5sum="$(md5sum ${inidir}/${inifile} | sed -e 's/ .*//')" 31 if [ "$md5sum" = "$old_md5sum" ]; then 32 mv "${inidir}/${inifile}.dpkg-new" "${inidir}/${inifile}" 33 fi 34 fi 35 36 # Enable the module 37 if [ -x "$(which php5enmod 2>/dev/null)" ]; then 38 php5enmod ${module}/${priority:-21} 39 fi 40 fi 41 42 exit 0