Arduino electric fence

I could just but a new unit, but where's the fun in that?

Well for the pigs welfare, a reliable unit is best. If the fence fails and the pigs get out then they might get lost, hit in traffic, or become prey for dogs and other predators.