Created
October 3, 2014 14:47
-
-
Save davejlong/091aa585dfce4ffa8897 to your computer and use it in GitHub Desktop.
Restart interface on Ubuntu now that they've disabled `service networking restart`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
iface=$1 | |
echo "Restarting $iface" | |
ifdown $iface | |
sleep 5 | |
ifup $iface | |
echo "Restarted $iface" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment