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

Emilien Klein e2jk-guest at alioth.debian.org
Sat Apr 20 19:52:43 UTC 2013


Author: e2jk-guest
Date: 2013-04-20 19:52:42 +0000 (Sat, 20 Apr 2013)
New Revision: 13359

Added:
   trunk/packages/gnuhealth/trunk/debian/postinst
   trunk/packages/gnuhealth/trunk/debian/preinst
Log:
Add preinst and postinst maintainer scripts to stop and start the Tryton server when installing/upgrading


Added: trunk/packages/gnuhealth/trunk/debian/postinst
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/postinst	                        (rev 0)
+++ trunk/packages/gnuhealth/trunk/debian/postinst	2013-04-20 19:52:42 UTC (rev 13359)
@@ -0,0 +1,45 @@
+#!/bin/sh
+# postinst script for gnuhealth
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        # 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
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst 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/preinst
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/preinst	                        (rev 0)
+++ trunk/packages/gnuhealth/trunk/debian/preinst	2013-04-20 19:52:42 UTC (rev 13359)
@@ -0,0 +1,41 @@
+#!/bin/sh
+# preinst script for gnuhealth
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+        # 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
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst 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