source: main/trunk/model-sites-dev/heritage-nz/collect/pdf-reports/FIX-UP-INDEX.sh@ 33205

Last change on this file since 33205 was 33205, checked in by davidb, 5 years ago

Adjustment in echo info printed out

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3
4# echo "***"
5# echo "* activate.pl operating on a networked drive with a Solr-based Greenstone collection"
6# echo "* is known to have a problem with file locking, with an issue that seems to be"
7# echo "* related to it trying to reference a 'sidx' index, even though there is only a"
8# echo "* 'didx' for this collection."
9# echo "*"
10# echo "* As a result of this, the effective 'mv building index' command goes awry, as"
11# echo "* the index directory hasn't been completely removed, and so we end up with"
12# echo "* 'building' inside of 'index'"
13# echo "*"
14# echo "* This script implements a fix, by doing the following:"
15# echo "* mv index/building ."
16# echo "* mv index index.DUFF"
17# echo "* mv building index"
18
19rm -rf index.DUFF/
20
21if [ -d index/building ] ; then
22 echo " Moving 'building' out of 'index'"
23 mv index/building .
24 echo " Renaming 'index' to 'index.DUFF'"
25 mv index index.DUFF
26 echo " Renaming 'building' to 'index'"
27 mv building index
28
29echo ""
30echo "Now restart the Greenstone3 server, as a user with sudo access:"
31echo " sudo systemctl restart greenstone3"
32
33else
34 echo "Failed to find 'building' inside 'index'" >&2
35 echo "Directory structure not in the form expected for fixing" >&2
36 echo "Exiting" >&2
37fi
38
Note: See TracBrowser for help on using the repository browser.