The man who opened fire with an assault rifle in a Texas church over the weekend, killing more than two dozen congregants, ended his military career with a stint in the brig at Marine Corps Air Station Miramar for domestic-violence crimes, authorities confirmed Monday.