Ok, ontopic, let me further explain my thoughts here.
OP has created a 5-min reboot script which is triggered by a netwatch entry.
This makes sense because netwatch fires directly after startup - restarting directly would create a boot loop.
When there is a connection - OP wants to cancel the reboot script for which you provided helpful hints to achieve.
Now, let's look at the bigger picture. What is the problem? Netwatch creates a boot loop. That's why the 5-minute wait is introduced in the first place.
If OP uses watchdog instead of netwatch, no script is required, no 5-minute delay is necessary and there is no need for a "stop command".