Gunman nabbed after shooting at San Antonio military base