To make certain that you didn't accidentally cause damage to the inverter, when operating on 30A shore power, you could install a relay similar to those found in automatic electrical transfer panels, a DPDT relay with contacts rated at least 30A. The relay would get power from the 120 vac shore power. When no shore power, the common side would be connected to the de-energized (normally off) contacts that go to your inverter. The moment the relay senses shore power, the relay energizes and the common side is now connected to the engerized (normally on) contacts. Your inverter would still be drawing power from the batteries, so you would want to shut down the inverter until you are ready to use it again.
The relay would be intalled ahead of the breaker panel.