check_printer.sh 279 B

12345678910
  1. #!/bin/bash
  2. PORTS=(6010 6012 6014 6016)
  3. AUTH="Authorization: Bearer PRINTER123cerveza@"
  4. for PORT in "${PORTS[@]}"; do
  5. echo "Checking printer on port $PORT..."
  6. RESPONSE=$(curl -s "http://localhost:$PORT/status" -H "$AUTH")
  7. echo "Port $PORT response: $RESPONSE"
  8. done