Bash version. Requires `devmem2`. Run this script at boot time to restore the gpio pins on the 40 pin connector to the correct state.