Subject: Patch for 164354

From: Thomas Viehmann <[email-masked]>
Date: Sat, 12 Apr 2003 23:11:01 +0200

tags 164354 + patch
thanks

Hi.

My patch for 183896 solves this as well.

Cheers

T.
--- phpgroupware-phpgroupware-0.9.14.000/debian/phpgroupware.postrm.orig	Sat Apr 12 22:49:35 2003
+++ phpgroupware-phpgroupware-0.9.14.000/debian/phpgroupware.postrm	Sat Apr 12 22:37:21 2003
@@ -57,8 +57,16 @@
 				MSsql)		dbtype="mssql"	;;
 				Oracle)		dbtype="oracle"	;;
 			esac
-			. /usr/share/wwwconfig-common/${dbtype}-dropuser.sh
-			. /usr/share/wwwconfig-common/${dbtype}-dropdb.sh
+			if [ -e /usr/share/wwwconfig-common/${dbtype}-dropuser.sh ] ; then
+			  . /usr/share/wwwconfig-common/${dbtype}-dropuser.sh
+			else
+			  echo "Cannot drop user (can't find wwwconfig-common script)." >&2
+			fi
+			if [ -e /usr/share/wwwconfig-common/${dbtype}-dropdb.sh ] ; then
+			  . /usr/share/wwwconfig-common/${dbtype}-dropdb.sh
+			else
+			  echo "Cannot drop database (can't find wwwconfig-common script)." >&2
+			fi
 
 			rm -rf /var/lib/phpgroupware/
 		fi
@@ -66,14 +74,22 @@
 		rm -rf /etc/phpgroupware
 		for server in $webservers ; do
 			conffile="/etc/$server/httpd.conf"
-			. /usr/share/wwwconfig-common/apache-uninclude.sh
+			if [ -e /usr/share/wwwconfig-common/apache-uninclude.sh ] ; then
+			  . /usr/share/wwwconfig-common/apache-uninclude.sh
+			else
+			  echo "Cannot uninclude apache config part (can't find wwwconfig-common script)." >&2
+			fi
 			if [ "$status" = "purge" ] ;
 				then restart="$restart $server"
 			fi
 		done
 
 		servers="exim apache-ssl apache mysql postresql"
-		. /usr/share/wwwconfig-common/restart.sh
+		if [ -e /usr/share/wwwconfig-common/restart.sh ] ; then
+		  . /usr/share/wwwconfig-common/restart.sh
+		else
+		  echo "Cannot restart servers (can't find wwwconfig-common script)." >&2
+		fi
 
 		for dir in /usr/share/phpgroupware-core /var/www/phpgroupware ; do
 			if [ -d ${dir} ] ; then rm -rf ${dir} ; fi
@@ -97,8 +113,8 @@
 	;;
 esac
 
-db_stop
-
 #DEBHELPER#
+
+db_stop
 
 exit 0