Update status.inc
This commit is contained in:
@@ -228,6 +228,13 @@ STATUS(){
|
|||||||
|
|
||||||
for NTYPE in "${ntypesel[@]}"; do
|
for NTYPE in "${ntypesel[@]}"; do
|
||||||
PH=${NTYPE}_HOSTS[0]
|
PH=${NTYPE}_HOSTS[0]
|
||||||
|
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ] || [ -f ${NM_TMPFOLDER}/${!PH}.skip ]; then
|
||||||
|
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
||||||
|
skip=1
|
||||||
|
else
|
||||||
|
PH=${NODETYPE}_HOSTS[1]
|
||||||
|
fi
|
||||||
|
fi
|
||||||
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
||||||
var=${NTYPE}_REPL_CHECK[@]
|
var=${NTYPE}_REPL_CHECK[@]
|
||||||
if [ ! -z ${!var+x} ]; then
|
if [ ! -z ${!var+x} ]; then
|
||||||
@@ -257,7 +264,7 @@ STATUS(){
|
|||||||
checked=good
|
checked=good
|
||||||
elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.timeout ]; then
|
elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.timeout ]; then
|
||||||
checked=timeout
|
checked=timeout
|
||||||
elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.skip ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${nip}.skip ]; then
|
elif [ ${skip} -eq 1 ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.skip ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${nip}.skip ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${!PH}.skip ]; then
|
||||||
checked=skip
|
checked=skip
|
||||||
fi
|
fi
|
||||||
if [ $(($(date +%s)-scanstart)) -gt 600 ]; then
|
if [ $(($(date +%s)-scanstart)) -gt 600 ]; then
|
||||||
@@ -916,7 +923,7 @@ REPLSTART(){
|
|||||||
PH=${NODETYPE}_HOSTS[0]
|
PH=${NODETYPE}_HOSTS[0]
|
||||||
PHA=${NODETYPE}_HOSTS
|
PHA=${NODETYPE}_HOSTS
|
||||||
skip=0
|
skip=0
|
||||||
echo "HERE1: ${skip} - ${!PH}"
|
# echo "HERE1: ${skip} - ${!PH}"
|
||||||
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then
|
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then
|
||||||
touch ${STATUSRUN_TMPFOLDER}/repl.${!PH}.skip
|
touch ${STATUSRUN_TMPFOLDER}/repl.${!PH}.skip
|
||||||
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
||||||
@@ -929,10 +936,10 @@ REPLSTART(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "HERE2: ${skip} - ${!PH}"
|
# echo "HERE2: ${skip} - ${!PH}"
|
||||||
|
|
||||||
if [ ${skip} -eq 0 ] && [ "${!PH}" != "" ]; then
|
if [ ${skip} -eq 0 ] && [ "${!PH}" != "" ]; then
|
||||||
echo "not skipped"
|
# echo "not skipped"
|
||||||
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
||||||
var=${NODETYPE}_REPL_CHECK[@]
|
var=${NODETYPE}_REPL_CHECK[@]
|
||||||
if [ ! -z ${!var+x} ]; then
|
if [ ! -z ${!var+x} ]; then
|
||||||
@@ -943,8 +950,8 @@ REPLSTART(){
|
|||||||
${PH_CMD} 'find '${NM_REPL_CHECK_LOC[${rcheck}]}' -iname "*.sync-conflict-*" -exec rm {} \;' &
|
${PH_CMD} 'find '${NM_REPL_CHECK_LOC[${rcheck}]}' -iname "*.sync-conflict-*" -exec rm {} \;' &
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
else
|
# else
|
||||||
echo "skipped"
|
# echo "skipped"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user