Code

collection4.*: Make Apache configuration configurable using debconf.
[pkg-collection4.git] / debian / collection4.config
diff --git a/debian/collection4.config b/debian/collection4.config
new file mode 100644 (file)
index 0000000..3d17b79
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+# config script for collection4
+#
+# see: dh_installdebconf(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <preconfigure> `configure' <installed-version>
+#        * <postinst> `configure' <old-version>
+#        * <reconfigure> `reconfigure' <installed-version>
+
+. /usr/share/debconf/confmodule
+
+case "$1" in
+       configure|reconfigure)
+               default_servers=""
+               if test -d /etc/apache2/conf.d; then
+                       default_servers="apache2"
+               fi
+
+               db_fget collection4/httpd seen
+               if [ "$RET" = "false" ]; then
+                       db_set collection4/httpd "$default_servers"
+               fi
+
+               db_input medium collection4/httpd || true
+               db_go || true
+               ;;
+
+       *)
+               echo "config called with unknown argument \`$1'" >&2
+               exit 1
+               ;;
+esac
+
+db_stop
+
+exit 0
+