|
|
|
|
@ -61,7 +61,7 @@ change_config
@@ -61,7 +61,7 @@ change_config
|
|
|
|
|
|
|
|
|
|
evt_full_rsync(){ |
|
|
|
|
echo "send $SOURCE_EVT to the destination" |
|
|
|
|
sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/ $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/ |
|
|
|
|
yes | sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT -o StrictHostKeyChecking=no" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/ $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
evt_common_files_rsync(){ |
|
|
|
|
@ -74,14 +74,13 @@ evt_specific_dirs_rsync(){
@@ -74,14 +74,13 @@ evt_specific_dirs_rsync(){
|
|
|
|
|
IFS=',' read -r -a array <<< "$FOLDERS" |
|
|
|
|
|
|
|
|
|
for folder in "${array[@]}"; do |
|
|
|
|
#rsync -avz "$SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/$folder" user@remote_host:/remote/path/ |
|
|
|
|
sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/$folder $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/ |
|
|
|
|
yes | sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT -o StrictHostKeyChecking=no" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/$folder $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/bin/storage/1/$SOURCE_EVT/ |
|
|
|
|
done |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fonts_rsync(){ |
|
|
|
|
echo "Send fonts to the destination" |
|
|
|
|
yes | sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "mkdir -p $DESTINATION_PLATFORM_PATH/bin/storage/1/fonts/" |
|
|
|
|
yes | sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT -o StrictHostKeyChecking=no "mkdir -p $DESTINATION_PLATFORM_PATH/bin/storage/1/fonts/" |
|
|
|
|
sshpass -p "$DESTINATION_PASSWORD" rsync -e "ssh -p $DESTINATION_PORT" -avz --ignore-existing $SOURCE_PLATFORM_PATH/bin/storage/1/fonts/ $DESTINATION_USER@$DESTINATION_IP:$DESTINATION_PLATFORM_PATH/bin/storage/1/fonts/ |
|
|
|
|
} |
|
|
|
|
fonts_rsync |
|
|
|
|
@ -100,6 +99,10 @@ fonts_rsync
@@ -100,6 +99,10 @@ fonts_rsync
|
|
|
|
|
else echo "EVENT_COMMON value must be 0 or 1 or 2" && exit |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if service --status-all 2>&1 | grep -q "platform5.service"; then |
|
|
|
|
systemctl start platform5 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
systemctl is-active --quiet platform5.service || systemctl start platform5 |
|
|
|
|
systemctl is-active --quiet platform6.service || systemctl start platform6 |
|
|
|
|
if service --status-all 2>&1 | grep -q "platform6.service"; then |
|
|
|
|
systemctl start platform6 |
|
|
|
|
fi |
|
|
|
|
|