As some point you'll likely find yourself writing a script which needs to run all the time - a "long running script". These are scripts that shouldn't fail if there's an error, or ones that should restart when the system reboots.
To accomplish this, we need something to watch these scripts. Such tools are process watchers. They watch processes and restart them if they fail, and ensure they start on system boot.
We often need to monitor long running processes, from small services to our entire applications. Upstart comes with many server distributions, including Ubuntu. Learn how to use Upstart now!
We'll learn to write Upstart configuration, use
initctl and write a small Golang web listener to monitor with Upstart.
For most Linux distributions, Systemd will be the officially support init process. This will, among many other things, monitor our processes like SysVInit and Upstart did. Get a leg up and learn how to use it now!