#!/bin/bash

# Server 同步
echo "###### Server sync ######"
rsync -avz --exclude-from=$HOME/bin/rsync.exclude $HOME/common-TEST/* MERGE_COMMON:$HOME/common-TEST/.
rsync -avz --exclude-from=$HOME/bin/rsync.exclude $HOME/common-TEST/* MERGE_ASIA:$HOME/common-TEST/.
rsync -avz --exclude-from=$HOME/bin/rsync.exclude $HOME/common-TEST/* MERGE_US:$HOME/common-TEST/.
rsync -avz --exclude-from=$HOME/bin/rsync.exclude $HOME/common-TEST/* MERGE_EU:$HOME/common-TEST/.

# config.ini 同步
echo "###### config00.ini sync ######"
rsync -avz $HOME/servers1/config00.ini MERGE_COMMON:$HOME/servers1/.
rsync -avz $HOME/servers1/config00.ini MERGE_ASIA:$HOME/servers11/.
rsync -avz $HOME/servers1/config00.ini MERGE_US:$HOME/servers21/.
rsync -avz $HOME/servers1/config00.ini MERGE_EU:$HOME/servers31/.

# Client 同步
echo "###### Client sync ######"
rsync -avz --exclude="setup.txt" $HOME/www/N1-TEST/* MERGE_COMMON:$HOME/www/N1-TEST/.

# s_rootcmds.ini 同步更新
echo "###### s_rootcmds.ini ######"
rsync -avz $HOME/bin/S_RootCmds.ini_test_n1 $HOME/bin/S_RootCmds.ini_live_n1 MERGE_COMMON:$HOME/bin/.
rsync -avz $HOME/bin/S_RootCmds.ini_test_n1 $HOME/bin/S_RootCmds.ini_live_n1 MERGE_ASIA:$HOME/bin/.
rsync -avz $HOME/bin/S_RootCmds.ini_test_n1 $HOME/bin/S_RootCmds.ini_live_n1 MERGE_US:$HOME/bin/.
rsync -avz $HOME/bin/S_RootCmds.ini_test_n1 $HOME/bin/S_RootCmds.ini_live_n1 MERGE_EU:$HOME/bin/.
