2009-11-22

Did I Ever Mention I'm A Total Techie?

     I think I did, a couple times, anyway, here's some more.

     I have a new server, hosted at a remote location, a server farm in Brooklyn.  I wanted to reconfigure some stuff with the network connection.  Fine.  How do you disconnect and reconnect, bring down and then bring back up, your network connections, from a remote host?  If you bring them down, you won't be connected to bring them back up!  Aha, you think, put it in a script.  That's part of it, but not all.  If the script is running and then you disconnect, the script will stop running unless you give it nohup.
#!/bin/sh
/sbin/ifdown eth0
sleep 4
/sbin/ifup eth0

then
nohup down_and_up
Wikipedia Affiliate Button