Help with writing script!

Why doesn’t “check gateway” work when setting a route with ip route? Are your WANs DHCP?