fix test failover
This commit is contained in:
@@ -71,11 +71,27 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "6. Test servizi FTP:"
|
echo "6. Test servizi FTP e SFTP:"
|
||||||
if timeout 5 bash -c "echo quit | nc $VIP 21" &>/dev/null; then
|
|
||||||
echo -e " ${GREEN}✓ FTP risponde${NC}"
|
# Test FTP (porta 21) - verifica solo che il server risponda
|
||||||
|
if timeout 2 bash -c "echo -e 'QUIT\r' | nc -w 1 $VIP 21 2>/dev/null | grep -q '220'" 2>/dev/null; then
|
||||||
|
echo -e " ${GREEN}✓ FTP risponde sulla porta 21${NC}"
|
||||||
else
|
else
|
||||||
echo -e " ${YELLOW}⚠ FTP non risponde (potrebbe essere normale)${NC}"
|
echo -e " ${RED}✗ FTP non risponde${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Test SFTP (porta 22) - verifica che il server SSH/SFTP risponda
|
||||||
|
if timeout 2 bash -c "echo '' | nc -w 1 $VIP 22 2>/dev/null | grep -q 'SSH'" 2>/dev/null; then
|
||||||
|
echo -e " ${GREEN}✓ SFTP risponde sulla porta 22${NC}"
|
||||||
|
else
|
||||||
|
echo -e " ${RED}✗ SFTP non risponde${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Test MySQL (porta 3306) - verifica che il server risponda
|
||||||
|
if timeout 2 bash -c "echo '' | nc -w 1 $VIP 3306 2>/dev/null" >/dev/null 2>&1; then
|
||||||
|
echo -e " ${GREEN}✓ MySQL risponde sulla porta 3306${NC}"
|
||||||
|
else
|
||||||
|
echo -e " ${RED}✗ MySQL non risponde${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user