Update run.sh

added check online conditions in the code. To test if it works as expected - then implement the code to catch the cases when the user is offline.