aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-03-30 16:07:29 +0100
committerLouise Crow <louise.crow@gmail.com>2015-03-30 16:07:29 +0100
commitd5d22fdbcb8fdede42972de7ab7aee1c5f68b8ce (patch)
treee94940650a30f5913b0942e5f1b662c22ac6ce6a /script
parent76094fe2d35407b85024011f5b8463e702d69bd5 (diff)
parent3c0604cf900ad274d8f6ff421d39854ccbf4b6af (diff)
Merge branch 'release/0.21' into rails-3-develop
Diffstat (limited to 'script')
-rwxr-xr-xscript/compact-xapian-database5
1 files changed, 1 insertions, 4 deletions
diff --git a/script/compact-xapian-database b/script/compact-xapian-database
index 7d32d7a15..0caff6394 100755
--- a/script/compact-xapian-database
+++ b/script/compact-xapian-database
@@ -15,11 +15,8 @@ if [ -x /usr/bin/xapian-compact ];
echo >&2 "Didn't compact Xapian database because there was an existing database at $XAPIAN_DB_DIR/$RAILS_ENV.new"
exit 1
else
- OWNER=$(stat -c %U "$XAPIAN_DB_DIR/$RAILS_ENV")
export XAPIAN_DB_DIR RAILS_ENV
- su "$OWNER" <<SU
-commonlib/bin/output-on-error xapian-compact "\$XAPIAN_DB_DIR/\$RAILS_ENV" "\$XAPIAN_DB_DIR/\$RAILS_ENV.new"
-SU
+ commonlib/bin/output-on-error xapian-compact "$XAPIAN_DB_DIR/$RAILS_ENV" "$XAPIAN_DB_DIR/$RAILS_ENV.new"
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"