Sprint 3 Completed Tasks - lmkelly/Autoguard GitHub Wiki

Task 1

My first task was to find a tool which would make sending emails from the back to the front end within a script easy. I found a guide that combined two utilities msmtp and mailx, msmtp to allow contact between our wireguard server and the email server, and mailx which would use that connection to allow me to send emails from the commandline, and thus in my script.

Task 2

The next step was to integrate this into grand_be.bash. This was relatively easy but also led to me tweaking the entire script and making it work more effectively which added some time to the process. The script now uses a file called next_ip to get the address for the machine it's assigning config to. It's a simple process, the next_ip file contains the next host address the script should assign, and once the scripts runs it adds to that number by one. In the next sprint if I have time I'll add a section which will not allow this number to exceed a certain user set parameter and send warning messages accordingly. I also changed the script so it creates that config file destined for the end user which is then sent using the aforementioned email solution.