Restarting an interface when it is disconnected

Yep.

The tricky part (if you use not the “simple” netwatch, but rather the newer, more powerful ICMP probe) is finding the right settings to trigger (or not trigger) the “down” script.

See:

@amm0
If I get this stuff right, the netwatch has a distinct advantage over “normal” scheduling, the “down” script is only run when the status changes from “up” to “down”, whilst a normally scheduled script would need to first check if the connection is not already down, otherwise if the disable/reenable doesn’t work (or if a connection is down for any other reason) the interface would be cyclically disabled and enabled every 20 seconds or so until the connection is restored (IF it is restored).