This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run in loop from command line: while sleep 60; do sh check_rds_status.sh; done | |
status=$(aws rds describe-db-instances --query 'DBInstances[].DBInstanceStatus[]' | grep stopping) | |
if [[ "$status" != *"stopping"* ]]; then | |
printf "RDS stopped\n" | |
say "RDS stopped" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run in a loop from command line: while sleep 60; do sh check_process_is_running.sh; done | |
status=$(ssh IP_ADDRESS_HERE -t "ps aux | grep PROCESS_NAME_HERE | grep -v \"color\|grep\"") | |
if [[ "$status" != *"PROCESS_NAME_HERE"* ]]; then | |
printf "Process finished\n" | |
say "Process finished" | |
fi |