Video Link:

https://drive.google.com/file/d/1huCyQVAc9jq3AtatJZtY-GQMX5PbreFc/view?usp=sharing


Date: 07.13.20


Topics Covered:

  1. Automating using bash scripting
    1. how to automate file download process
    2. how to automate file permissions update process
    3. how to add conditional logic to automation workflow
    4. how to handle/catch errors
  2. Troubleshooting automation scripts
    1. brief overview


Time Stamp: 

5:42 - Our current process walk through

 Ryan Walks Eseosa through our standard process for setting up a new Client on an New instance

20:24 - Introduction to writing scripts 

- "Anything that we type on the command line can be automated" -Eseosa

31:00 - Begin Trouble shooting 

Error "Directory not empty"

33:10 - How to Capture output files

using tee command and explanation

example: filename.ext | tee output.log

33:59 - Can we do if statements with Bash scripts? - Yes





Take Away notes:


Make any file executable using command:

chmod +x hello.sh(filename.ext)


(Video: 28:54) Explanation for  chown/chmod command 

changing ownership (here we have 2 commands joined by &&):

sudo chown -R www-data:www-data /var/www/moodle &&  sudo chmod -R 775 /var/www/moodle


chown command changes ownership of file

chmod command  changes permissions of our file 


When writing scripts and you are entering two commands at a time use &&. This way the second command will only execute if the first line runs.


(Video 31:49) -  It is Important to Capture output files so we can go back and see where the potential Error occurred