mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
building both sides check
This commit is contained in:
parent
c0b594b2bc
commit
1ef5fec676
@ -402,14 +402,40 @@ function smart_gs {
|
|||||||
last_primaryCLMD5=$(sed "3q;d" ${HISTORY_MD5})
|
last_primaryCLMD5=$(sed "3q;d" ${HISTORY_MD5})
|
||||||
last_secondCLMD5=$(sed "4q;d" ${HISTORY_MD5})
|
last_secondCLMD5=$(sed "4q;d" ${HISTORY_MD5})
|
||||||
|
|
||||||
|
PRIDBCHANGE="0"
|
||||||
|
SECDBCHANGE="0"
|
||||||
|
PRICLCHANGE="0"
|
||||||
|
SECICLCHANGE="0"
|
||||||
|
|
||||||
if [ "${primaryDBMD5}" != "${last_primaryDBMD5}" ]
|
if [ "${primaryDBMD5}" != "${last_primaryDBMD5}" ]
|
||||||
then
|
then
|
||||||
pull_gs_grav
|
PRIDBCHANGE="1"
|
||||||
PULLRESTART="1"
|
# pull_gs_grav
|
||||||
elif [ "${secondDBMD5}" != "${last_secondDBMD5}" ]
|
# PULLRESTART="1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${secondDBMD5}" != "${last_secondDBMD5}" ]
|
||||||
then
|
then
|
||||||
push_gs_grav
|
SECDBCHANGE="1"
|
||||||
PUSHRESTART="1"
|
# push_gs_grav
|
||||||
|
# PUSHRESTART="1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${PRIDBCHANGE}" == "${SECDBCHANGE}" ]
|
||||||
|
then
|
||||||
|
if [ "${PRIDBCHANGE}" != "0" ]
|
||||||
|
then
|
||||||
|
echo "Both sides have changed"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
then
|
||||||
|
if [ "${PRIDBCHANGE}" != "0" ]
|
||||||
|
then
|
||||||
|
echo "Primary has changed"
|
||||||
|
elif [ "${SECDBCHANGE}" != "0" ]
|
||||||
|
then
|
||||||
|
echo "Secondary has changed"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${primaryCLMD5}" != "${last_primaryCLMD5}" ]
|
if [ "${primaryCLMD5}" != "${last_primaryCLMD5}" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user