Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Network config reset
#!/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
You can’t perform that action at this time.