[pycsw] 05/06: Create apache24 postinst

Johan Van de Wauw johanvdw-guest at moszumanska.debian.org
Tue Oct 7 07:16:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

johanvdw-guest pushed a commit to branch master
in repository pycsw.

commit a0a88be066be8aa201be3c8249508e95b8bf9df7
Author: Johan Van de Wauw <johan.vandewauw at gmail.com>
Date:   Tue Oct 7 08:45:02 2014 +0200

    Create apache24 postinst
---
 debian/pycsw-cgi.postinst | 59 ++++++++---------------------------------------
 debian/pycsw-cgi.prerm    |  5 ++++
 2 files changed, 14 insertions(+), 50 deletions(-)

diff --git a/debian/pycsw-cgi.postinst b/debian/pycsw-cgi.postinst
index 7651c6c..b5caf21 100644
--- a/debian/pycsw-cgi.postinst
+++ b/debian/pycsw-cgi.postinst
@@ -1,51 +1,10 @@
 #!/bin/sh
-# postinst script for pycsw
-#
-# 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
-
-install() {
-    a2enmod cgi
-    a2ensite pycsw
-    #this surely has to be improved
-    cp /etc/pycsw/default-sample.cfg /etc/pycsw/default.cfg
-}
-
-case "$1" in
-    configure)
-        install
-    ;;
-
-    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
-
-
-
-
-
+ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+        . /usr/share/apache2/apache2-maintscript-helper
+        apache2_invoke enmod cgi || exit $?
+    fi
+
+ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+        . /usr/share/apache2/apache2-maintscript-helper
+        apache2_invoke ensite pycsw || exit $?
+    fi
diff --git a/debian/pycsw-cgi.prerm b/debian/pycsw-cgi.prerm
new file mode 100644
index 0000000..63b84c2
--- /dev/null
+++ b/debian/pycsw-cgi.prerm
@@ -0,0 +1,5 @@
+#/bin/bash
+f [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+        . /usr/share/apache2/apache2-maintscript-helper
+        apache2_invoke dissite pycsw || exit $?
+    fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pycsw.git



More information about the Pkg-grass-devel mailing list