mirror of https://github.com/apache/lucene.git
added debug option
git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@419663 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9561be65e8
commit
9e4cbff310
|
@ -22,7 +22,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset solr_hostname solr_port data_dir webapp_name user verbose
|
unset solr_hostname solr_port data_dir webapp_name user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -38,10 +38,11 @@ usage: $prog [-h hostname] [-p port] [-d dir] [-w webappname] [-u username] [-v]
|
||||||
-w specify name of Solr webapp (defaults to solr)
|
-w specify name of Solr webapp (defaults to solr)
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts h:p:d:w:u:v OPTION
|
while getopts h:p:d:w:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
h)
|
h)
|
||||||
|
@ -62,12 +63,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${solr_port} ]]
|
if [[ -z ${solr_port} ]]
|
||||||
then
|
then
|
||||||
echo "Solr port number missing in $confFile or command line."
|
echo "Solr port number missing in $confFile or command line."
|
||||||
|
|
|
@ -22,7 +22,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset solr_hostname solr_port data_dir webapp_name user verbose
|
unset solr_hostname solr_port data_dir webapp_name user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -38,10 +38,11 @@ usage: $prog [-h hostname] [-p port] [-d dir] [-w webapp_name] [-u username] [-v
|
||||||
-w specify name of Solr webapp (defaults to solr)
|
-w specify name of Solr webapp (defaults to solr)
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts h:p:d:w:u:v OPTION
|
while getopts h:p:d:w:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
h)
|
h)
|
||||||
|
@ -62,12 +63,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${solr_port} ]]
|
if [[ -z ${solr_port} ]]
|
||||||
then
|
then
|
||||||
echo "Solr port number missing in $confFile or command line."
|
echo "Solr port number missing in $confFile or command line."
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset data_dir user verbose
|
unset data_dir user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -34,10 +34,11 @@ usage: $prog [-d dir] [-u username] [-v]
|
||||||
-d specify directory holding index data
|
-d specify directory holding index data
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts d:u:v OPTION
|
while getopts d:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
d)
|
d)
|
||||||
|
@ -49,12 +50,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
# use default value for data_dir if not specified
|
# use default value for data_dir if not specified
|
||||||
# relative path starts at ${solr_root}
|
# relative path starts at ${solr_root}
|
||||||
if [[ -z ${data_dir} ]]
|
if [[ -z ${data_dir} ]]
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset days num data_dir user verbose
|
unset days num data_dir user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -37,10 +37,11 @@ usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]
|
||||||
-d specify directory holding index data
|
-d specify directory holding index data
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts D:N:d:u:v OPTION
|
while getopts D:N:d:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
D)
|
D)
|
||||||
|
@ -58,12 +59,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${days} && -z ${num} ]]
|
if [[ -z ${days} && -z ${num} ]]
|
||||||
then
|
then
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
|
|
|
@ -22,7 +22,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset solr_hostname solr_port webapp_name user verbose
|
unset solr_hostname solr_port webapp_name user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -37,10 +37,11 @@ usage: $prog [-h hostname] [-p port] [-w webapp_name] [-u username] [-v]
|
||||||
-w specify name of Solr webapp (defaults to solr)
|
-w specify name of Solr webapp (defaults to solr)
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts h:p:w:u:v OPTION
|
while getopts h:p:w:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
h)
|
h)
|
||||||
|
@ -58,12 +59,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${solr_port} ]]
|
if [[ -z ${solr_port} ]]
|
||||||
then
|
then
|
||||||
echo "Solr port number missing in $confFile or command line."
|
echo "Solr port number missing in $confFile or command line."
|
||||||
|
|
|
@ -22,7 +22,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset solr_hostname solr_port webapp_name user verbose
|
unset solr_hostname solr_port webapp_name user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -37,11 +37,12 @@ usage: $prog [-h hostname] [-p port] [-u username] [-v]
|
||||||
-w specify name of Solr webapp (defaults to solr)
|
-w specify name of Solr webapp (defaults to solr)
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
originalargs="$@"
|
originalargs="$@"
|
||||||
while getopts h:p:w:u:v OPTION
|
while getopts h:p:w:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
h)
|
h)
|
||||||
|
@ -59,12 +60,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${solr_port} ]]
|
if [[ -z ${solr_port} ]]
|
||||||
then
|
then
|
||||||
echo "Solr port number missing in $confFile or command line."
|
echo "Solr port number missing in $confFile or command line."
|
||||||
|
|
|
@ -22,7 +22,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset solr_hostname solr_port webapp_name user verbose
|
unset solr_hostname solr_port webapp_name user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -37,11 +37,12 @@ usage: $prog [-p hostname] [-p port] [-w webapp_name] [-u username] [-v]
|
||||||
-w specify name of Solr webapp (defaults to solr)
|
-w specify name of Solr webapp (defaults to solr)
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
originalargs="$@"
|
originalargs="$@"
|
||||||
while getopts h:p:w:u:v OPTION
|
while getopts h:p:w:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
h)
|
h)
|
||||||
|
@ -59,12 +60,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${solr_port} ]]
|
if [[ -z ${solr_port} ]]
|
||||||
then
|
then
|
||||||
echo "Solr port number missing in $confFile or command line."
|
echo "Solr port number missing in $confFile or command line."
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset user verbose
|
unset user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -33,10 +33,11 @@ USAGE="\
|
||||||
usage: $prog [-u username] [-v]
|
usage: $prog [-u username] [-v]
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts u:v OPTION
|
while getopts u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
u)
|
u)
|
||||||
|
@ -45,12 +46,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
fixUser "$@"
|
fixUser "$@"
|
||||||
|
|
||||||
start=`date +"%s"`
|
start=`date +"%s"`
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset user verbose
|
unset user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -32,10 +32,11 @@ USAGE="\
|
||||||
usage: $prog [-u username] [-v]
|
usage: $prog [-u username] [-v]
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts u:v OPTION
|
while getopts u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
u)
|
u)
|
||||||
|
@ -44,12 +45,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
fixUser "$@"
|
fixUser "$@"
|
||||||
|
|
||||||
start=`date +"%s"`
|
start=`date +"%s"`
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset data_dir solr_port rsyncd_port user verbose
|
unset data_dir solr_port rsyncd_port user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -35,10 +35,11 @@ usage: $prog [-d dir] [-p portnum] [-u username] [-v]
|
||||||
-p specify rsyncd port number
|
-p specify rsyncd port number
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts d:p:u:v OPTION
|
while getopts d:p:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
d)
|
d)
|
||||||
|
@ -53,12 +54,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
fixUser "$@"
|
fixUser "$@"
|
||||||
|
|
||||||
# try to determine rsyncd port number from $confFile if not specified on
|
# try to determine rsyncd port number from $confFile if not specified on
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset user verbose
|
unset user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -33,10 +33,11 @@ USAGE="\
|
||||||
usage: $prog [-u username] [-v]
|
usage: $prog [-u username] [-v]
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts u:v OPTION
|
while getopts u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
u)
|
u)
|
||||||
|
@ -45,12 +46,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
fixUser "$@"
|
fixUser "$@"
|
||||||
|
|
||||||
logMessage stopped by $oldwhoami
|
logMessage stopped by $oldwhoami
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
# Shell script to disable rsyncd
|
# util functions used by scripts
|
||||||
|
|
||||||
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
|
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset days num data_dir user verbose
|
unset days num data_dir user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -37,10 +37,11 @@ usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]
|
||||||
-d specify directory holding index data
|
-d specify directory holding index data
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts D:N:d:u:v OPTION
|
while getopts D:N:d:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
D)
|
D)
|
||||||
|
@ -58,12 +59,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${days} && -z ${num} ]]
|
if [[ -z ${days} && -z ${num} ]]
|
||||||
then
|
then
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
|
|
|
@ -22,7 +22,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset master_host master_status_dir data_dir user verbose
|
unset master_host master_status_dir data_dir user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -38,10 +38,11 @@ usage: $prog [-M master] [-S sdir] [-d dir] [-u username] [-v]
|
||||||
-d specify directory holding index data on local machine
|
-d specify directory holding index data on local machine
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts M:S:d:u:v OPTION
|
while getopts M:S:d:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
M)
|
M)
|
||||||
|
@ -59,12 +60,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${master_host} ]]
|
if [[ -z ${master_host} ]]
|
||||||
then
|
then
|
||||||
echo "name of master server missing in $confFile or command line."
|
echo "name of master server missing in $confFile or command line."
|
||||||
|
|
|
@ -22,7 +22,7 @@ solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset master_host rsyncd_port master_data_dir master_status_dir snap_name
|
unset master_host rsyncd_port master_data_dir master_status_dir snap_name
|
||||||
unset sizeonly stats data_dir user verbose compress startStatus
|
unset sizeonly stats data_dir user verbose debug compress startStatus
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -43,11 +43,12 @@ usage: $prog [-M master] [-P portnum] [-D mdir] [-S sdir] [-n snapshot] [-d dir]
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-s use the --size-only option with rsync
|
-s use the --size-only option with rsync
|
||||||
-v increase verbosity (-vv show file transfer stats also)
|
-v increase verbosity (-vv show file transfer stats also)
|
||||||
|
-V output debugging info
|
||||||
-z enable compression of data
|
-z enable compression of data
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts M:P:D:S:n:d:u:svz OPTION
|
while getopts M:P:D:S:n:d:u:svVz OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
M)
|
M)
|
||||||
|
@ -77,6 +78,9 @@ do
|
||||||
v)
|
v)
|
||||||
[[ -n $verbose ]] && stats="--stats" || verbose=v
|
[[ -n $verbose ]] && stats="--stats" || verbose=v
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
z)
|
z)
|
||||||
compress="z"
|
compress="z"
|
||||||
;;
|
;;
|
||||||
|
@ -86,6 +90,8 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
if [[ -z ${master_host} ]]
|
if [[ -z ${master_host} ]]
|
||||||
then
|
then
|
||||||
echo "name of master server missing in $confFile or command line."
|
echo "name of master server missing in $confFile or command line."
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset user verbose
|
unset user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -33,10 +33,11 @@ USAGE="\
|
||||||
usage: $prog [-u username] [-v]
|
usage: $prog [-u username] [-v]
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts u:v OPTION
|
while getopts u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
u)
|
u)
|
||||||
|
@ -45,12 +46,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
fixUser "$@"
|
fixUser "$@"
|
||||||
|
|
||||||
start=`date +"%s"`
|
start=`date +"%s"`
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset user verbose
|
unset user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -33,10 +33,11 @@ USAGE="\
|
||||||
usage: $prog [-u username] [-v]
|
usage: $prog [-u username] [-v]
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts u:v OPTION
|
while getopts u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
u)
|
u)
|
||||||
|
@ -45,12 +46,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
fixUser "$@"
|
fixUser "$@"
|
||||||
|
|
||||||
start=`date +"%s"`
|
start=`date +"%s"`
|
||||||
|
|
|
@ -21,7 +21,7 @@ cd ${0%/*}/..
|
||||||
solr_root=$(pwd)
|
solr_root=$(pwd)
|
||||||
cd ${orig_dir}
|
cd ${orig_dir}
|
||||||
|
|
||||||
unset data_dir user verbose
|
unset data_dir user verbose debug
|
||||||
. ${solr_root}/bin/scripts-util
|
. ${solr_root}/bin/scripts-util
|
||||||
|
|
||||||
# set up variables
|
# set up variables
|
||||||
|
@ -34,10 +34,11 @@ usage: $prog [-d dir] [-u username] [-v]
|
||||||
-d specify directory holding index data
|
-d specify directory holding index data
|
||||||
-u specify user to sudo to before running script
|
-u specify user to sudo to before running script
|
||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
|
-V output debugging info
|
||||||
"
|
"
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
while getopts d:u:v OPTION
|
while getopts d:u:vV OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
d)
|
d)
|
||||||
|
@ -49,12 +50,17 @@ do
|
||||||
v)
|
v)
|
||||||
verbose="v"
|
verbose="v"
|
||||||
;;
|
;;
|
||||||
|
V)
|
||||||
|
debug="V"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$USAGE"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $debug ]] && set -x
|
||||||
|
|
||||||
fixUser "$@"
|
fixUser "$@"
|
||||||
|
|
||||||
# use default value for data_dir if not specified
|
# use default value for data_dir if not specified
|
||||||
|
|
Loading…
Reference in New Issue