files
*.substvars
*.log
+*.debhelper
The Local Unified Index is a index that contains multiple logical indexes
(subdatabases). The underlying index is a Solr/Lucene 5 index configured
to use a specific LUI schema.
+
+Package: masterkey-lui-zookeeper
+Architecture: all
+Depends: openjdk-7-jdk, ${misc:Depends}
+Description: Local Unified Index (Zookeeper)
+ The Local Unified Index is a index that contains multiple logical indexes
+ (subdatabases). The underlying index is a Solr/Lucene 5 index configured
+ to use a specific LUI schema. This package provides an installation
+ of Apache Zookeeper suitable for a lui-solr cluster.
+++ /dev/null
-etc/default
-usr/share/masterkey/lui
-usr/share/doc/masterkey-lui-solr5
-etc/masterkey/lui/solr
-var/log/masterkey/lui
-var/lib/masterkey/lui/solr/lui
+++ /dev/null
-dist usr/share/masterkey/lui
-conf/solr/* etc/masterkey/lui/solr
-doc/* usr/share/doc/masterkey-lui-solr5
+++ /dev/null
-etc/masterkey/lui/solr/lui-solr.in.sh etc/default/lui-solr.in.sh
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This script should be sourced into other zookeeper
-# scripts to setup the env variables
-
-# We use ZOOCFGDIR if defined,
-# otherwise we use /etc/zookeeper
-# or the conf directory that is
-# a sibling of this script's directory
-
-ZOOBINDIR=/usr/share/masterkey/lui/zookeeper/bin
-ZOOKEEPER_PREFIX="${ZOOBINDIR}/.."
-ZOOCFGDIR=/etc/masterkey/lui/zookeeper
-ZOO_LOG_DIR=/var/log/masterkey/lui
-ZOOPIDDIR=/var/lib/masterkey/lui
-ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid
-
-JMXDISABLE=1
-JVMFLAGS="-Xmx512m -Xms256m"
-
-if [ "x$ZOOCFGDIR" = "x" ]
-then
- if [ -e "${ZOOKEEPER_PREFIX}/conf" ]; then
- ZOOCFGDIR="$ZOOBINDIR/../conf"
- else
- ZOOCFGDIR="$ZOOBINDIR/../etc/zookeeper"
- fi
-fi
-
-if [ "x$ZOOCFG" = "x" ]
-then
- ZOOCFG="zoo.cfg"
-fi
-
-ZOOCFG="$ZOOCFGDIR/$ZOOCFG"
-
-if [ -f "$ZOOCFGDIR/java.env" ]
-then
- . "$ZOOCFGDIR/java.env"
-fi
-
-if [ "x${ZOO_LOG_DIR}" = "x" ]
-then
- ZOO_LOG_DIR="."
-fi
-
-if [ "x${ZOO_LOG4J_PROP}" = "x" ]
-then
- ZOO_LOG4J_PROP="INFO,CONSOLE"
-fi
-
-if [ "$JAVA_HOME" != "" ]; then
- JAVA="$JAVA_HOME/bin/java"
-else
- JAVA=java
-fi
-
-#add the zoocfg dir to classpath
-CLASSPATH="$ZOOCFGDIR:$CLASSPATH"
-
-for i in "$ZOOBINDIR"/../src/java/lib/*.jar
-do
- CLASSPATH="$i:$CLASSPATH"
-done
-
-#make it work in the binary package
-if [ -e "${ZOOKEEPER_PREFIX}"/share/zookeeper/zookeeper-*.jar ]; then
- for i in "$ZOOKEEPER_PREFIX"/share/zookeeper/*.jar
- do
- CLASSPATH="$i:$CLASSPATH"
- done
-else
- #release tarball format
- for i in "$ZOOBINDIR"/../zookeeper-*.jar
- do
- CLASSPATH="$i:$CLASSPATH"
- done
- for i in "$ZOOBINDIR"/../lib/*.jar
- do
- CLASSPATH="$i:$CLASSPATH"
- done
-fi
-
-#make it work for developers
-for d in "$ZOOBINDIR"/../build/lib/*.jar
-do
- CLASSPATH="$d:$CLASSPATH"
-done
-
-#make it work for developers
-CLASSPATH="$ZOOBINDIR/../build/classes:$CLASSPATH"
-
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- *) cygwin=false ;;
-esac
-
-if $cygwin
-then
- CLASSPATH=`cygpath -wp "$CLASSPATH"`
-fi
-
-#echo "CLASSPATH=$CLASSPATH"
+++ /dev/null
-#! /bin/sh
-
-# init script for lui-zookeeper
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-### BEGIN INIT INFO
-# Provides: lui-zookeeper
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop:
-# Short-Description: Apache ZooKeeper server for Index Data Local Unified Index (LUI)
-### END INIT INFO
-
-set -e
-
-# /etc/init.d/lui-zookeeper: start and stop the Apache ZooKeeper daemon
-
-umask 022
-
-. /etc/default/lui-zookeeper
-
-. /lib/lsb/init-functions
-
-check_privsep_dir() {
- # Create the PrivSep empty dir if necessary
- if [ ! -d ${ZOOPIDDIR} ]; then
- mkdir -p ${ZOOPIDDIR}
- chown lui-solr:lui-solr ${ZOOPIDDIR}
- chmod 0775 ${ZOOPIDDIR}
- fi
-}
-
-# Are we running from init?
-run_by_init() {
- ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
-}
-
-check_for_no_start() {
- # forget it if we're trying to start, and /etc/masterkey/lui/zookeeper/zookeeper_not_to_be_run exists
- if [ -e /etc/masterkey/lui/zookeeper/zookeeper_not_to_be_run ]; then
- if [ "$1" = log_end_msg ]; then
- log_end_msg 0
- fi
- if ! run_by_init; then
- log_action_msg "Apache ZooKeeper server not in use (/etc/zookeeper/zookeeper_not_to_be_run)"
- fi
- exit 0
- fi
-}
-
-export PATH="${PATH:+$PATH:}/usr/sbin:/usr/bin"
-
-case "$1" in
- start)
- check_for_no_start
- check_privsep_dir
- log_daemon_msg "Starting Apache ZooKeeper server" "zookeeper"
- if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c lui-solr -x ${ZOOKEEPER_PREFIX}/bin/zkServer.sh start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- stop)
- log_daemon_msg "Stopping Apache ZooKeeper server" "zookeeper"
- if start-stop-daemon --stop --quiet --oknodo --pidfile ${ZOOPIDFILE}; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
-
- restart)
- check_privsep_dir
- log_daemon_msg "Restarting Apache ZooKeeper server" "zookeeper"
- start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${ZOOPIDFILE}
- check_for_no_start log_end_msg
- if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c lui-solr -x ${ZOOKEEPER_PREFIX}/bin/zkServer.sh start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
-
- try-restart)
- check_privsep_dir
- log_daemon_msg "Restarting Apache ZooKeeper server" "zookeeper"
- set +e
- start-stop-daemon --stop --quiet --retry 30 --pidfile ${ZOOPIDFILE}
- RET="$?"
- set -e
- case $RET in
- 0)
- # old daemon stopped
- check_for_no_start log_end_msg
- if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c lui-solr -x ${ZOOKEEPER_PREFIX}/bin/zkServer.sh start; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- 1)
- # daemon not running
- log_progress_msg "(not running)"
- log_end_msg 0
- ;;
- *)
- # failed to stop
- log_progress_msg "(failed to stop)"
- log_end_msg 1
- ;;
- esac
- ;;
-
- status)
- status_of_proc -p ${ZOOPIDFILE} ${JAVA_HOME}/bin/java zookeeper && exit 0 || exit $?
- ;;
-
- *)
- log_action_msg "Usage: /etc/init.d/lui-zookeeper {start|stop|restart|try-restart|status}"
- exit 1
-esac
-
-exit 0
--- /dev/null
+etc/default
+usr/share/masterkey/lui/dist
+usr/share/doc/masterkey-lui-solr5
+etc/masterkey/lui/solr
+var/log/masterkey/lui
+var/lib/masterkey/lui/solr/lui
--- /dev/null
+dist/solr-5*.tgz usr/share/masterkey/lui/dist
+dist/install_solr_service.sh usr/share/masterkey/lui/dist
+conf/solr/* etc/masterkey/lui/solr
+doc/* usr/share/doc/masterkey-lui-solr5
--- /dev/null
+etc/masterkey/lui/solr/lui-solr.in.sh etc/default/lui-solr.in.sh
\ No newline at end of file
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ configure|upgrade)
+ # Create the solr user
+ adduser --system --shell /bin/bash --group --disabled-password --home /var/lib/masterkey/lui lui-solr
+ # Set directory permissions
+ chown -R lui-solr /var/lib/masterkey/lui
+ chown -R lui-solr /var/log/masterkey/lui
+ chown -R lui-solr /etc/masterkey/lui/solr/solr-home
+ # Run Solr installation script
+ /usr/share/masterkey/lui/dist/install_solr_service.sh /usr/share/masterkey/lui/dist/solr-5.5.1.tgz -d /var/lib/masterkey/lui -i /usr/share/masterkey/lui -s lui-solr -u lui-solr -f
+ # Remove extra files created by Solr installation
+ rm -f /var/lib/masterkey/lui/log4j.properties
+ rm -rf /var/lib/masterkey/lui/logs
+ rm -rf /var/lib/masterkey/lui/data
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument '$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ purge|remove)
+ # Remove Solr installation
+ rm -f /usr/share/masterkey/lui/lui-solr
+ rm -rf /usr/share/masterkey/lui/solr-*
+
+ # Automatically added by dh_installinit
+ if [ "$1" = "purge" ] ; then
+ update-rc.d lui-solr remove >/dev/null
+ fi
+
+
+ # In case this system is running systemd, we make systemd reload the unit files
+ # to pick up changes.
+ if [ -d /run/systemd/system ] ; then
+ systemctl --system daemon-reload >/dev/null || true
+ fi
+ # End automatically added section
+
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+esac
+
+exit 0
--- /dev/null
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This script should be sourced into other zookeeper
+# scripts to setup the env variables
+
+# We use ZOOCFGDIR if defined,
+# otherwise we use /etc/zookeeper
+# or the conf directory that is
+# a sibling of this script's directory
+
+ZOOBINDIR=/usr/share/masterkey/lui/zookeeper/bin
+ZOOKEEPER_PREFIX="${ZOOBINDIR}/.."
+ZOOCFGDIR=/etc/masterkey/lui/zookeeper
+ZOO_LOG_DIR=/var/log/masterkey/lui
+ZOOPIDDIR=/var/lib/masterkey/lui
+ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid
+
+JMXDISABLE=1
+JVMFLAGS="-Xmx512m -Xms256m"
+
+if [ "x$ZOOCFGDIR" = "x" ]
+then
+ if [ -e "${ZOOKEEPER_PREFIX}/conf" ]; then
+ ZOOCFGDIR="$ZOOBINDIR/../conf"
+ else
+ ZOOCFGDIR="$ZOOBINDIR/../etc/zookeeper"
+ fi
+fi
+
+if [ "x$ZOOCFG" = "x" ]
+then
+ ZOOCFG="zoo.cfg"
+fi
+
+ZOOCFG="$ZOOCFGDIR/$ZOOCFG"
+
+if [ -f "$ZOOCFGDIR/java.env" ]
+then
+ . "$ZOOCFGDIR/java.env"
+fi
+
+if [ "x${ZOO_LOG_DIR}" = "x" ]
+then
+ ZOO_LOG_DIR="."
+fi
+
+if [ "x${ZOO_LOG4J_PROP}" = "x" ]
+then
+ ZOO_LOG4J_PROP="INFO,CONSOLE"
+fi
+
+if [ "$JAVA_HOME" != "" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+else
+ JAVA=java
+fi
+
+#add the zoocfg dir to classpath
+CLASSPATH="$ZOOCFGDIR:$CLASSPATH"
+
+for i in "$ZOOBINDIR"/../src/java/lib/*.jar
+do
+ CLASSPATH="$i:$CLASSPATH"
+done
+
+#make it work in the binary package
+if [ -e "${ZOOKEEPER_PREFIX}"/share/zookeeper/zookeeper-*.jar ]; then
+ for i in "$ZOOKEEPER_PREFIX"/share/zookeeper/*.jar
+ do
+ CLASSPATH="$i:$CLASSPATH"
+ done
+else
+ #release tarball format
+ for i in "$ZOOBINDIR"/../zookeeper-*.jar
+ do
+ CLASSPATH="$i:$CLASSPATH"
+ done
+ for i in "$ZOOBINDIR"/../lib/*.jar
+ do
+ CLASSPATH="$i:$CLASSPATH"
+ done
+fi
+
+#make it work for developers
+for d in "$ZOOBINDIR"/../build/lib/*.jar
+do
+ CLASSPATH="$d:$CLASSPATH"
+done
+
+#make it work for developers
+CLASSPATH="$ZOOBINDIR/../build/classes:$CLASSPATH"
+
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ *) cygwin=false ;;
+esac
+
+if $cygwin
+then
+ CLASSPATH=`cygpath -wp "$CLASSPATH"`
+fi
+
+#echo "CLASSPATH=$CLASSPATH"
--- /dev/null
+etc/default
+usr/share/masterkey/lui/dist
+usr/share/doc/masterkey-lui-zookeeper
+etc/masterkey/lui/zookeeper
+var/log/masterkey/lui
+var/lib/masterkey/lui/zookeeper
--- /dev/null
+#! /bin/sh
+
+# init script for lui-zookeeper
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+### BEGIN INIT INFO
+# Provides: lui-zookeeper
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: Apache ZooKeeper server for Index Data Local Unified Index (LUI)
+### END INIT INFO
+
+set -e
+
+# /etc/init.d/lui-zookeeper: start and stop the Apache ZooKeeper daemon
+
+umask 022
+
+. /etc/default/masterkey-lui-zookeeper
+
+. /lib/lsb/init-functions
+
+check_privsep_dir() {
+ # Create the PrivSep empty dir if necessary
+ if [ ! -d ${ZOOPIDDIR} ]; then
+ mkdir -p ${ZOOPIDDIR}
+ chown lui-solr:lui-solr ${ZOOPIDDIR}
+ chmod 0775 ${ZOOPIDDIR}
+ fi
+}
+
+# Are we running from init?
+run_by_init() {
+ ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
+}
+
+check_for_no_start() {
+ # forget it if we're trying to start, and /etc/masterkey/lui/zookeeper/zookeeper_not_to_be_run exists
+ if [ -e /etc/masterkey/lui/zookeeper/zookeeper_not_to_be_run ]; then
+ if [ "$1" = log_end_msg ]; then
+ log_end_msg 0
+ fi
+ if ! run_by_init; then
+ log_action_msg "Apache ZooKeeper server not in use (/etc/zookeeper/zookeeper_not_to_be_run)"
+ fi
+ exit 0
+ fi
+}
+
+export PATH="${PATH:+$PATH:}/usr/sbin:/usr/bin"
+
+case "$1" in
+ start)
+ check_for_no_start
+ check_privsep_dir
+ log_daemon_msg "Starting Apache ZooKeeper server" "zookeeper"
+ if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c lui-solr -x ${ZOOKEEPER_PREFIX}/bin/zkServer.sh start; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping Apache ZooKeeper server" "zookeeper"
+ if start-stop-daemon --stop --quiet --oknodo --pidfile ${ZOOPIDFILE}; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+ ;;
+
+ restart)
+ check_privsep_dir
+ log_daemon_msg "Restarting Apache ZooKeeper server" "zookeeper"
+ start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${ZOOPIDFILE}
+ check_for_no_start log_end_msg
+ if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c lui-solr -x ${ZOOKEEPER_PREFIX}/bin/zkServer.sh start; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+ ;;
+
+ try-restart)
+ check_privsep_dir
+ log_daemon_msg "Restarting Apache ZooKeeper server" "zookeeper"
+ set +e
+ start-stop-daemon --stop --quiet --retry 30 --pidfile ${ZOOPIDFILE}
+ RET="$?"
+ set -e
+ case $RET in
+ 0)
+ # old daemon stopped
+ check_for_no_start log_end_msg
+ if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c lui-solr -x ${ZOOKEEPER_PREFIX}/bin/zkServer.sh start; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+ ;;
+ 1)
+ # daemon not running
+ log_progress_msg "(not running)"
+ log_end_msg 0
+ ;;
+ *)
+ # failed to stop
+ log_progress_msg "(failed to stop)"
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+
+ status)
+ status_of_proc -p ${ZOOPIDFILE} ${JAVA_HOME}/bin/java zookeeper && exit 0 || exit $?
+ ;;
+
+ *)
+ log_action_msg "Usage: /etc/init.d/lui-zookeeper {start|stop|restart|try-restart|status}"
+ exit 1
+esac
+
+exit 0
--- /dev/null
+dist/zookeeper-*.tar.gz usr/share/masterkey/lui/dist
+conf/zookeeper/* etc/masterkey/lui/zookeeper
+doc/* usr/share/doc/masterkey-lui-zookeeper
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ configure|upgrade)
+ # Set directory permissions
+ chown -R lui-solr:lui-solr /var/lib/masterkey/lui
+ chown -R lui-solr:lui-solr /var/log/masterkey/lui
+ # Unpack zookeeper tarball
+ cd /usr/share/masterkey/lui
+ tar xzf dist/zookeeper-3.4.6.tar.gz
+ ln -s zookeeper-3.4.6 zookeeper
+ mkdir -p zookeeper/libexec
+ ln -s /etc/default/masterkey-lui-zookeeper zookeeper/libexec/zkEnv.sh
+
+ # Automatically added by dh_installinit
+ if [ -x "/etc/init.d/masterkey-lui-zookeeper" ]; then
+ update-rc.d masterkey-lui-zookeeper defaults >/dev/null
+ invoke-rc.d masterkey-lui-zookeeper start || exit $?
+ fi
+ # End automatically added section
+
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument '$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ purge|remove)
+ # Remove Zookeeper installation
+ rm -f /usr/share/masterkey/lui/zookeeper
+ rm -rf /usr/share/masterkey/lui/zookeeper-*
+
+ # Automatically added by dh_installinit
+ if [ "$1" = "purge" ] ; then
+ update-rc.d masterkey-lui-zookeeper remove >/dev/null
+ fi
+
+
+ # In case this system is running systemd, we make systemd reload the unit files
+ # to pick up changes.
+ if [ -d /run/systemd/system ] ; then
+ systemctl --system daemon-reload >/dev/null || true
+ fi
+ # End automatically added section
+
+ ;;
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+esac
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ install|upgrade)
+ # Create the solr user
+ adduser --system --shell /bin/bash --group --disabled-password --home /var/lib/masterkey/lui lui-solr
+
+ # Automatically added by dh_installinit
+ if [ -x "/etc/init.d/masterkey-lui-zookeeper" ]; then
+ invoke-rc.d masterkey-lui-zookeeper stop || exit $?
+ fi
+ # End automatically added section
+
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument '$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ remove|upgrade|deconfigure)
+
+ # Automatically added by dh_installinit
+ if [ -x "/etc/init.d/masterkey-lui-zookeeper" ]; then
+ invoke-rc.d masterkey-lui-zookeeper stop || exit $?
+ fi
+ # End automatically added section
+
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument '$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+++ /dev/null
-#!/bin/sh -e
-
-case "$1" in
- configure|upgrade)
- # Create the solr user
- adduser --system --shell /bin/bash --group --disabled-password --home /var/lib/masterkey/lui lui-solr
- # Set directory permissions
- chown -R lui-solr /var/lib/masterkey/lui
- chown -R lui-solr /var/log/masterkey/lui
- chown -R lui-solr /etc/masterkey/lui/solr/solr-home
- # Run Solr installation script
- /usr/share/masterkey/lui/dist/install_solr_service.sh /usr/share/masterkey/lui/dist/solr-5.5.1.tgz -d /var/lib/masterkey/lui -i /usr/share/masterkey/lui -s lui-solr -u lui-solr -f
- # Remove extra files created by Solr installation
- rm -f /var/lib/masterkey/lui/log4j.properties
- rm -rf /var/lib/masterkey/lui/logs
- rm -rf /var/lib/masterkey/lui/data
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument '$1'" >&2
- exit 1
- ;;
-esac
-
-exit 0
+++ /dev/null
-#!/bin/sh -e
-
-case "$1" in
- purge|remove)
- # Remove Solr installation
- rm -f /usr/share/masterkey/lui/lui-solr
- rm -rf /usr/share/masterkey/lui/solr-*
- ;;
- upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
-esac
-
-exit 0
- name: Link Zookeeper defaults into /etc/default
become: yes
- file: src=/vagrant/debian/lui-zookeeper.default path=/etc/default/lui-zookeeper state=link
+ file: src=/vagrant/debian/masterkey-lui-zookeeper.default path=/etc/default/masterkey-lui-zookeeper state=link
- name: Link Zookeeper defaults into /usr/share/masterkey/lui/zookeeper/libexec
become: yes
- file: src=/etc/default/lui-zookeeper path=/usr/share/masterkey/lui/zookeeper/libexec/zkEnv.sh state=link
+ file: src=/etc/default/masterkey-lui-zookeeper path=/usr/share/masterkey/lui/zookeeper/libexec/zkEnv.sh state=link
- name: Link init script
become: yes
- file: src=/vagrant/debian/lui-zookeeper.init path=/etc/init.d/lui-zookeeper state=link
+ file: src=/vagrant/debian/masterkey-lui-zookeeper.init path=/etc/init.d/masterkey-lui-zookeeper state=link
- name: Enable and start service
become: yes
- service: name=lui-zookeeper enabled=yes state=started
+ service: name=masterkey-lui-zookeeper enabled=yes state=started