Solution please :)

If anyone can help me in my case:
OK, i have a hotspot server and my ISP sometimes cuts off the internet due to technical issues or other reasons.
so what i want is the following, i need to make a configuration if possible to disable my hotspot server automatically if the internet was off, so no client will login and his time runs away.
please i need someone to help me. thank you

Use netwatch to watch a server out on the Internet, such as 8.8.8.8 (Google’s primary public DNS resolver). Add scripts to the up and down events. On down events have it run “/ip hotspot disable [/ip hotspot find]” to disable all Hotspots. On up events have it run “/ip hotspot enable [/ip hotspot find]” to enable all Hotspots.

If you find that users aren’t logged out when a Hotspot is disabled you can change the down event script to “/ip hotspot active remove [/ip hotspot active find]; /ip hotspot disable [/ip hotspot find]” to first log everybody out manually.

thank you very much, i appreciate.
is there any other ideas?