#!/bin/bash # Script to check git status on aitbc and aitbc1 servers echo "=== Checking AITBC Servers Git Status ===" # Check aitbc server echo -e "\n=== Checking aitbc server ===" if ssh aitbc "cd /opt/aitbc && git status" 2>/dev/null; then echo "aitbc server reachable" else echo "aitbc server not reachable" fi # Check aitbc1 server echo -e "\n=== Checking aitbc1 server ===" if ssh aitbc1 "cd /opt/aitbc && git status" 2>/dev/null; then echo "aitbc1 server reachable" else echo "aitbc1 server not reachable" fi # Check aitbc-cascade (current server) echo -e "\n=== Checking aitbc-cascade server (local) ===" cd /opt/aitbc git status echo -e "\n=== Server connectivity summary ===" echo "aitbc: $(ssh -o ConnectTimeout=5 aitbc echo "reachable" 2>/dev/null || echo "not reachable")" echo "aitbc1: $(ssh -o ConnectTimeout=5 aitbc1 echo "reachable" 2>/dev/null || echo "not reachable")" echo "aitbc-cascade: local"