--- UPDATE 1 [2019/05/11]: Thanks to @mirrorbox’s suggestion, I refactored the script to use service status instead of ps aux | grep which makes the script even more simple. As a result, the syntax has changed. Since I keep the article untouched, for the updated code visit either the GitHub or GitLab repositories. The new syntax is as follows: # Syntax$ /path/to/daemon-keeper.sh Correct usage: daemon-keeper.sh -d {daemon} -e {extra daemon to (re)start}[-e {another extra daemon to (re)start}...