Better ping command, now with less hardcoding.