This script must do the following: * detect pile failures * failover failed piles and switch primary * display bridge state in TUI