Temporary restraining orders are issued all the time. A good start is to run it through that process. The trick will always be to prevent abuse. There has to be a credible concern, not some anti-gun person calling in an anonymous threat because they know someone has guns and doesn't like them...