From f7a1ec367e5d14ce2f95a12c4414f208e83f79c3 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Sun, 28 Jun 2020 22:23:43 -0500 Subject: [PATCH] Building out smart sync --- gravity-sync.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 17ef29d..bd5562c 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -367,6 +367,15 @@ function push_gs { } +function smart_gs { + md5_compare + + echo -e $primaryDBMD5 + echo -e $secondDBMD5 + echo -e $primaryCLMD5 + echo -e $secondCLMD5 +} + function restore_gs { MESSAGE="This will restore ${GRAVITY_FI} on $HOSTNAME with the previous version!" echo_warn @@ -1383,7 +1392,17 @@ function root_check { case $# in 0) - task_invalid + TASKTYPE='SYNC' + MESSAGE="${MESSAGE}: ${TASKTYPE} Requested" + echo_good + + import_gs + validate_gs_folders + validate_ph_folders + validate_os_sshpass + + smart_gs + exit ;; 1)