Bash script to check status of services