Your script looks good enough, but code-golfing can be fun and a good way to learn. You might want to discover the interfaces rather than hard-coding eth0 and eth1 (what if there is an eth2? or just eth0?).
Comment on Re: How do I check the status of a remote network