-
-
Save pniederlag/39480138a868252705bd4898753d99d9 to your computer and use it in GitHub Desktop.
Network config reset
This file contains 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