Well, the easiest way would be to add:
Code:
*/5 * * * * /root/go.sh
to your crontab, which will run every 5 minutes. If you aren't able to log in and disable it, it will run, copy over the new interfaces file and reboot.
Code:
[go.sh] script file should contain
/bin/cp /etc/network/interfaces.backup /etc/network/interfaces; reboot;