From 7eb0ee9468b23d8aa3e7aefac99c266d62068740 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 18 Feb 2015 16:32:36 +0000 Subject: Restart alaveteli rather than apache --- script/compact-xapian-database | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script/compact-xapian-database') diff --git a/script/compact-xapian-database b/script/compact-xapian-database index 075a71cd8..02014c92c 100755 --- a/script/compact-xapian-database +++ b/script/compact-xapian-database @@ -22,7 +22,7 @@ SU mv "$XAPIAN_DB_DIR/$RAILS_ENV" "$XAPIAN_DB_DIR/$RAILS_ENV.tmp" mv "$XAPIAN_DB_DIR/$RAILS_ENV.new" "$XAPIAN_DB_DIR/$RAILS_ENV" rm -rf "$XAPIAN_DB_DIR/$RAILS_ENV.tmp" - commonlib/bin/output-on-error /etc/init.d/apache2 restart + commonlib/bin/output-on-error service alaveteli restart fi else echo >&2 "Could not find xapian-compact script; have you installed xapian-tools?" -- cgit v1.2.3 From 00a38fa1b6250a4d3a8898116698b4b0b45324b9 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Thu, 5 Mar 2015 13:19:37 +0000 Subject: Add optional daemon_name parameter For hosts with multiple alaveteli services --- script/compact-xapian-database | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'script/compact-xapian-database') diff --git a/script/compact-xapian-database b/script/compact-xapian-database index 02014c92c..7d32d7a15 100755 --- a/script/compact-xapian-database +++ b/script/compact-xapian-database @@ -1,6 +1,7 @@ #!/bin/bash export RAILS_ENV=$1 +if [ -z $2 ]; then DAEMON_NAME=alaveteli; else DAEMON_NAME=$2; fi set -e cd "$(dirname "$0")"/.. @@ -22,7 +23,7 @@ SU mv "$XAPIAN_DB_DIR/$RAILS_ENV" "$XAPIAN_DB_DIR/$RAILS_ENV.tmp" mv "$XAPIAN_DB_DIR/$RAILS_ENV.new" "$XAPIAN_DB_DIR/$RAILS_ENV" rm -rf "$XAPIAN_DB_DIR/$RAILS_ENV.tmp" - commonlib/bin/output-on-error service alaveteli restart + commonlib/bin/output-on-error service "$DAEMON_NAME" restart fi else echo >&2 "Could not find xapian-compact script; have you installed xapian-tools?" -- cgit v1.2.3