Check if internet is connected

on startup of PC check if internet is connected. if not shutdown the pc