zet

Bash Script to Swap DNS (/etc/resolv.conf)

https://youtu.be/o_U76-7LmTQ

WARNING: ONLY DO THIS STUFF IN A CONTAINER FIRST!

  1. What is DNS?
  2. Why do I care?
  3. How would I do this by hand?
  4. How could we automate this?
  5. Create a toggleres script
  6. Start by while read -r line through file
  7. Use “recursive descent” approach
  8. Create states when in section
  9. Add toggle state if statements
  10. Use continue early to continue line parsing
  11. Put into function
  12. Write to temp file
  13. Copy file over production file