+
+
+if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
+ . /usr/share/apache2/apache2-maintscript-helper
+
+ webalizer_enable() {
+ cp_echo "CN: Enabling $PKG configuration for Apache2."
+ return 0
+ }
+else
+ cp_echo "CN: Could not load Apache 2.4 maintainer script helper."
+
+ webalizer_enable() {
+ return 1
+ }
+fi
+
+webalizer_error() {
+ cp_echo "CN: Error while trying to enable $PKG configuration for Apache2."
+}
+
+mv_conffile()
+{
+ local oldconffile="$1"
+ local newconffile="$2"
+
+ rm -f $oldconffile.dpkg-remove
+ [ -e "$oldconffile" ] || return 0
+
+ cp_echo "CN: Preserving user changes to $newconffile (renamed from $oldconffile)."
+ mv -f "$newconffile" "$newconffile.dpkg-new"
+ mv -f "$oldconffile" "$newconffile"
+}
+
+
+mv_conffile /etc/apache2/conf.d/$PKG.conf \
+ /etc/apache2/conf-available/$PKG.conf