Don’t be a Tw@t – Use At!

Sigh :( today I made a schoolboy error – making config changes to a live firewall on a remote server without giving myself any kind of safety net! Anyway, this is an example of where you should really use something like the at command to bail you out should anything go wrong:

get the current system time:

Schedule at to run a command 5 minutes from now:
at -m 13:50
service iptables stop

Now, make those firewall changes that you need to, without worrying!

If all goes belly up, at will stop the firewall in 5 mins.

If all goes well, you can cancel the at command:
atrm 2


You can leave a response, or trackback from your own site.

Leave a Reply