Reboot Linux after network connection lost

Create a bash script as root:

I saved it to /root/check_network.sh and did a

to it.

Then I opened the crontab as root with

and added at the end the following line