diff -u dokuwiki-0.0.20050922/debian/postinst dokuwiki-0.0.20050922/debian/postinst
--- dokuwiki-0.0.20050922/debian/postinst
+++ dokuwiki-0.0.20050922/debian/postinst
@@ -94,11 +94,12 @@
 
 sub restart_apaches
 {
-  SRV:	foreach my $srv ('apache', 'apache2', 'apache-ssl', 'apache-perl')
+ SRV:	foreach my $srv (split /, /,get('dokuwiki/webservers'))
 	{
+		print(">>> $srv\n");
 		my $dir = "/etc/$srv";
 
-		if (! -d $dir)
+		if (! -x "/usr/sbin/$srv")
 		{
 			next SRV;
 		}
@@ -108,19 +109,7 @@
 			symlink('/etc/dokuwiki/apache.conf', "$dir/conf.d/dokuwiki.conf");
 			chmod(0644, "/etc/dokuwiki/apache.conf");
 		}
-		elsif (-f "$dir/httpd.conf")
-		{
-			if (system("grep -q /etc/dokuwiki/apache.conf $dir/httpd.conf"))
-			{
-				system("echo Include /etc/dokuwiki/apache.conf >> $dir/httpd.conf");
-			}
-		}
 		
-		if (! -x "/etc/init.d/$srv")
-		{
-			next SRV;
-		}
-
 		if (-x "/usr/sbin/invoke-rc.d")
 		{
 			(!system("/usr/sbin/invoke-rc.d $srv restart >/dev/tty 2>&1"))
diff -u dokuwiki-0.0.20050922/debian/config dokuwiki-0.0.20050922/debian/config
--- dokuwiki-0.0.20050922/debian/config
+++ dokuwiki-0.0.20050922/debian/config
@@ -46,10 +46,21 @@
 	if ($ret[0] == 30) {
 		return undef;
 	} else {
-		return "accessible";
+		return "webservers";
 	}
 }
 
+sub webservers
+{
+	title("Web Servers");
+	input("high", "dokuwiki/webservers");
+	my @ret = go();
+	if ($ret[0] == 30) {
+		return undef;
+	} else {
+		return "accessible";
+	}
+}
 sub accessible
 {
 	title("Access Control");
diff -u dokuwiki-0.0.20050922/debian/postrm dokuwiki-0.0.20050922/debian/postrm
--- dokuwiki-0.0.20050922/debian/postrm
+++ dokuwiki-0.0.20050922/debian/postrm
@@ -1,16 +1,19 @@
 #!/bin/sh -e
 
+. /usr/share/debconf/confmodule
+db_version 2.0 || [ $? -lt 30 ]
+
+
 # Postrm script for DokuWiki by Matti Pöllä <mpo@iki.fi>
 # Based on postrm for PHPWiki written by Matthew Palmer.
 
 if [ "$1" = "remove" ]; then
-	for srv in apache apache2 apache-ssl apache-perl; do
-		if [ -e /etc/$srv/httpd.conf ]; then
-			tfile=`tempfile`
-			# Remove the Include directive
-			grep -v '^Include /etc/dokuwiki/apache.conf$' /etc/$srv/httpd.conf > $tfile
-			mv $tfile /etc/$srv/httpd.conf
-
+	db_get "dokuwiki/webservers"
+	webservers="$RET"
+	#for srv in apache apache2 apache-ssl apache-perl; do
+	for srv in $webservers; do
+		srv=${srv%,}
+		if [ -x /usr/sbin/$srv ]; then
 			# Clear out the symlink
 			rm -f /etc/$srv/conf.d/dokuwiki.conf
 
@@ -53,0 +57,3 @@
+
+db_stop
+exit 0
