[med-svn] r13360 - trunk/packages/gnuhealth/trunk/debian

Emilien Klein e2jk-guest at alioth.debian.org
Sat Apr 20 20:28:56 UTC 2013


Author: e2jk-guest
Date: 2013-04-20 20:28:55 +0000 (Sat, 20 Apr 2013)
New Revision: 13360

Added:
   trunk/packages/gnuhealth/trunk/debian/postrm
   trunk/packages/gnuhealth/trunk/debian/prerm
Log:
Handle stopping and starting the Tryton server when removing the package


Added: trunk/packages/gnuhealth/trunk/debian/postrm
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/postrm	                        (rev 0)
+++ trunk/packages/gnuhealth/trunk/debian/postrm	2013-04-20 20:28:55 UTC (rev 13360)
@@ -0,0 +1,43 @@
+#!/bin/sh
+# postrm script for gnuhealth
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        # Start the Tryton server
+        if which invoke-rc.d >/dev/null 2>&1; then
+            invoke-rc.d tryton-server start
+        else
+            /etc/init.d/tryton-server start
+        fi
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: trunk/packages/gnuhealth/trunk/debian/prerm
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/prerm	                        (rev 0)
+++ trunk/packages/gnuhealth/trunk/debian/prerm	2013-04-20 20:28:55 UTC (rev 13360)
@@ -0,0 +1,44 @@
+#!/bin/sh
+# prerm script for gnuhealth
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        # Stop the Tryton server
+        if which invoke-rc.d >/dev/null 2>&1; then
+            invoke-rc.d tryton-server stop
+        else
+            /etc/init.d/tryton-server stop
+        fi
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0




More information about the debian-med-commit mailing list