Use if/else instead of pinging script for status