Last active
November 23, 2016 07:52
-
-
Save StephenKing/83fedc56137f5640de929b4430f1b653 to your computer and use it in GitHub Desktop.
Network config reset
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/sh | |
########################################## | |
# Make sure that $FILE.$BACKUP_EXT exists! | |
# i.e. /etc/network/interfaces.bak | |
########################################## | |
FILE=/etc/network/interfaces | |
BACKUP_EXT=bak | |
echo "mv $FILE $FILE.reverted; cp $FILE.$BACKUP_EXT $FILE; service networking restart" | at now + 1 min | |
echo "reboot" | at now + 5 min | |
echo "Following jobs are scheduled:" | |
atq | |
echo | |
echo "Remove jobs using 'atrm <num>' to unschedule" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment