~slub.team/goobi-indexserver/3.x

« back to all changes in this revision

Viewing changes to solr/scripts/snappuller-disable

  • Committer: Sebastian Meyer
  • Date: 2012-08-03 09:12:40 UTC
  • Revision ID: sebastian.meyer@slub-dresden.de-20120803091240-x6861b0vabq1xror
Remove Lucene and Solr source code and add patches instead
Fix Bug #985487: Auto-suggestion for the search interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
#
3
 
# Licensed to the Apache Software Foundation (ASF) under one or more
4
 
# contributor license agreements.  See the NOTICE file distributed with
5
 
# this work for additional information regarding copyright ownership.
6
 
# The ASF licenses this file to You under the Apache License, Version 2.0
7
 
# (the "License"); you may not use this file except in compliance with
8
 
# the License.  You may obtain a copy of the License at
9
 
#
10
 
#     http://www.apache.org/licenses/LICENSE-2.0
11
 
#
12
 
# Unless required by applicable law or agreed to in writing, software
13
 
# distributed under the License is distributed on an "AS IS" BASIS,
14
 
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 
# See the License for the specific language governing permissions and
16
 
# limitations under the License.
17
 
#
18
 
# Shell script to disable snappuller
19
 
 
20
 
orig_dir=$(pwd)
21
 
cd ${0%/*}/..
22
 
solr_root=$(pwd)
23
 
cd ${orig_dir}
24
 
 
25
 
unset user verbose debug
26
 
. ${solr_root}/bin/scripts-util
27
 
 
28
 
# set up variables
29
 
prog=${0##*/}
30
 
log=${solr_root}/logs/snappuller.log
31
 
 
32
 
# define usage string
33
 
USAGE="\
34
 
usage: $prog [-u username] [-v] [-V]
35
 
       -u          specify user to sudo to before running script
36
 
       -v          increase verbosity
37
 
       -V          output debugging info
38
 
"
39
 
 
40
 
# parse args
41
 
while getopts u:vV OPTION
42
 
do
43
 
    case $OPTION in
44
 
    u)
45
 
        user="$OPTARG"
46
 
        ;;
47
 
    v)
48
 
        verbose="v"
49
 
        ;;
50
 
    V)
51
 
        debug="V"
52
 
        ;;
53
 
    *)
54
 
        echo "$USAGE"
55
 
        exit 1
56
 
    esac
57
 
done
58
 
 
59
 
[[ -n $debug ]] && set -x
60
 
 
61
 
fixUser "$@"
62
 
 
63
 
setStartTime
64
 
 
65
 
logMessage disabled by $oldwhoami
66
 
logMessage command: $0 $@
67
 
name=${solr_root}/logs/snappuller-enabled
68
 
 
69
 
if [[ -f ${name} ]]
70
 
then
71
 
    rm -f ${name}
72
 
else
73
 
    logMessage snappuller not currently enabled
74
 
    logExit exited 1
75
 
fi
76
 
 
77
 
logExit ended 0