In this video walkthrough, you will learn how to create a Linux Bash Shell script from scratch to monitor a service and start the service if it is stopped. We will also show how to add the Linux Shell script to a Cron job to automatically run the Bash script at a specified interval.
Subscribe to the channel: [ Ссылка ]
My blog: [ Ссылка ]
_____________________________________________________
Social Media: [ Ссылка ]
LinkedIn: [ Ссылка ]
Github: [ Ссылка ]
Introduction - 0:00
Overview of the environment and Nginx - 1:10
Overview of the Linux Bash shell script and syntax - 2:00
The next steps after creating the Bash shell script - 4:12
Copying the file over using WinSCP - 4:33
Make the shell script executable - 5:00
Simulating a failure of Nginx - 5:18
Running the Bash shell script to check the status of Nginx and see if it automatically restarts - 5:50
Check the status of Nginx after running the script - 6:25
Add the shell script to a CRON job - 7:05
Explanation of the CRON job syntax - 7:30
Saving the CRON tab file - 8:26
Concluding thoughts and wrapping up - 8:45
Take a look at the detailed blog post of this tutorial here:
[ Ссылка ]
Linux bash
shell scripting
learn bash scripting
monitor Linux service
devops
automating linux
restart a stopped service
monitor a linux service
Ещё видео!