Starting work on the postinst file
authorChris Cormack <chris@bigballofwax.co.nz>
Tue, 5 Aug 2008 10:05:23 +0000 (22:05 +1200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 28 Oct 2008 21:09:22 +0000 (22:09 +0100)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
debian/libkoha-perl.postinst [new file with mode: 0644]

diff --git a/debian/libkoha-perl.postinst b/debian/libkoha-perl.postinst
new file mode 100644 (file)
index 0000000..caa3bd3
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+set -e
+
+# Load the debconf library - this must come FIRST; do not insert any other
+# commands before this
+. /usr/share/debconf/confmodule
+
+echo "INFO: postinst as '$1'"
+
+case "$1" in
+  configure)
+    echo "Configuring..."
+    
+    # set up logrotate
+    # remove first in case we are reconfiguring
+    rm /etc/logrotate.d/koha
+    
+    # add logrotate
+    ln -s /etc/koha/koha.logrotate /etc/logrotate.d/koha
+    
+    # reload apache
+    /etc/init.d/apache2 reload
+    ;;
+    
+  abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+    
+  *)
+    echo "postinst called with unknown argument \$1'" >&2
+    exit 0
+    ;;
+esac
+
+#DEBHELPER#
+
+# finish up
+db_stop
+exit 0
\ No newline at end of file