Fix net up

I am not really fond of using ping here but a quick change and checking for On-line status at the beginning of the script to kill it instead of running other parts.