[Pkg-mono-svn-commits] rev 542 - xsp-snapshot/trunk/debian/official

Pablo Fischer pabl0-guest@haydn.debian.org
Sat, 10 Apr 2004 13:57:00 -0600


Author: pabl0-guest
Date: 2004-04-10 13:56:58 -0600 (Sat, 10 Apr 2004)
New Revision: 542

Added:
   xsp-snapshot/trunk/debian/official/asp.net-examples.postrm
Removed:
   xsp-snapshot/trunk/debian/official/asp.net-examples.prerm
Modified:
   xsp-snapshot/trunk/debian/official/asp.net-examples.postinst
Log:
Now the removal script will be after the installation as succeed. 
 
It works like the postinst.



Modified: xsp-snapshot/trunk/debian/official/asp.net-examples.postinst
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.postinst	2004-04-10 19:51:40 UTC (rev 541)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.postinst	2004-04-10 19:56:58 UTC (rev 542)
@@ -38,4 +38,5 @@
 	;;
 esac
 
+#DEBHELPER#
 exit 0

Added: xsp-snapshot/trunk/debian/official/asp.net-examples.postrm
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.postrm	2004-04-10 19:51:40 UTC (rev 541)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.postrm	2004-04-10 19:56:58 UTC (rev 542)
@@ -0,0 +1,33 @@
+#!/bin/sh -e
+
+package="aspnet-examples"
+
+update() {
+   daemon="$1"
+   cfg_dir="$2"   
+   which mono-$daemon-update.conf || return 0
+   if [ -d "/etc/$cfg_dir" ]; then
+       #Remove the config host dir
+       rm -Rf "$cfg_dir/conf.d/$package"
+       #Update..
+       mono-$daemon-update.conf || true
+   fi
+}
+    
+
+case "$1" in
+    purge|remove)
+	update xsp xsp
+	update server mono-server
+	;;
+    
+    abort-upgrade|abort-remove|abort-deconfigure)
+        #Do nothing..
+    ;;
+
+    *)
+	;;
+esac
+
+#DEBHELPER#
+exit 0

Deleted: xsp-snapshot/trunk/debian/official/asp.net-examples.prerm
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.prerm	2004-04-10 19:51:40 UTC (rev 541)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.prerm	2004-04-10 19:56:58 UTC (rev 542)
@@ -1,69 +0,0 @@
-#!/bin/sh -e
-
-aspnet_xspconfd="/etc/xsp/conf.d/asp.net"
-aspnet_monoserverconfd="/etc/mono-server/conf.d/asp.net"
-
-monoserver_default="/etc/default/mono-server"
-monoxsp_default="/etc/default/mono-xsp"
-
-restart_xsp() {
-    #XSP is running?
-    if [ -f /var/run/mono-xsp ]; then
-        # Are we really running xsp?
-	xsp_pid=`cat /var/run/mono-xsp`
-	xsp_ps=`ps -p $xsp_pid | wc -l`
- 	# Are there any process running by that pid?
-	if [ "$xsp_ps" != "1" ]; then
-	    #Include default
-	    . $monoxsp_default
-	    if [ "$start_boot" = "true" ]; then
-		echo "Restarting XSP WebServer: mono-xsp"
-		/etc/init.d/mono-xsp restart > /dev/null 2>&1 || true
-	    fi
-	fi
-    fi
-}
-
-restart_monoserver() {
-    #MonoServer is running?
-    if [ -f /var/run/mono-server ]; then
-        # Are we really running xsp?
-	monoserver_pid=`cat /var/run/mono-server`
-	monoserver_ps=`ps -p $monoserver_pid | wc -l`
- 	# Are there any process running by that pid?
-	if [ "$xsp_ps" != "1" ]; then
-	    #Include default (monoserver)
-	    . $monoserver_default
-	    if [ "$start_boot" = "true" ]; then
-		echo "Restarting Mono Server: mod-mono-server"
-		/etc/init.d/mono-server restart > /dev/null 2>&1 || true
-	    fi
-	fi
-    fi
-}
-
-case "$1" in
-    remove)
-	if [ -x "`which mono-xsp-update.conf`" 2>/dev/null -a -d /etc/xsp ]; then
-	    rm -Rf $aspnet_xspconfd
-	    mono-xsp-update.conf
-	    restart_xsp
-	fi
-
-	if [ -x "`which mono-server-update.conf`" > /dev/null 2>&1 -a -d /etc/mono-server ]; then
-	    rm -Rf $aspnet_monoserverconfd
-	    mono-server-update.conf
-	    restart_monoserver
-	fi
-	;;
-    
-    abort-upgrade|abort-remove|abort-deconfigure)
-        #Do nothing..
-    ;;
-
-    *)
-	;;
-esac
-
-exit 0
-