postinst/rm files for Solr4
authorDennis Schafroth <dennis@indexdata.com>
Fri, 28 Jun 2013 13:31:24 +0000 (15:31 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Fri, 28 Jun 2013 13:31:24 +0000 (15:31 +0200)
debian/masterkey-lui-solr4-master-tomcat6.postinst [new file with mode: 0644]
debian/masterkey-lui-solr4-master-tomcat6.postrm [new file with mode: 0644]
debian/masterkey-lui-solr4-slave-tomcat6.postinst [new file with mode: 0644]
debian/masterkey-lui-solr4-slave-tomcat6.postrm [new file with mode: 0644]

diff --git a/debian/masterkey-lui-solr4-master-tomcat6.postinst b/debian/masterkey-lui-solr4-master-tomcat6.postinst
new file mode 100644 (file)
index 0000000..9b4ba0a
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+ln -sf /etc/masterkey/lui/lui-solr-master.xml /etc/tomcat6/Catalina/localhost/solr.xml
+chown -R tomcat6:tomcat6 /var/lib/masterkey/lui/solr/master
diff --git a/debian/masterkey-lui-solr4-master-tomcat6.postrm b/debian/masterkey-lui-solr4-master-tomcat6.postrm
new file mode 100644 (file)
index 0000000..8b3502e
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+case "$1" in
+    purge|remove)
+       rm -f /etc/tomcat6/Catalina/localhost/solr.xml
+#      rm -f /etc/tomcat6/policy.d/05harvester.policy
+        ;;
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/masterkey-lui-solr4-slave-tomcat6.postinst b/debian/masterkey-lui-solr4-slave-tomcat6.postinst
new file mode 100644 (file)
index 0000000..a647647
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+ln -sf /etc/masterkey/lui/lui-solr-slave.xml /etc/tomcat6/Catalina/localhost/solr-slave.xml
+chown -R tomcat6:tomcat6 /var/lib/masterkey/lui/solr/slave
diff --git a/debian/masterkey-lui-solr4-slave-tomcat6.postrm b/debian/masterkey-lui-solr4-slave-tomcat6.postrm
new file mode 100644 (file)
index 0000000..2c4542a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+case "$1" in
+    purge|remove)
+       rm -f /etc/tomcat6/Catalina/localhost/solr-slave.xml
+#      rm -f /etc/tomcat6/policy.d/05harvester.policy
+        ;;
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+#DEBHELPER#
+
+exit 0