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 | |
# based on AWS Cloud9 | |
# shutdown ec2 if no ssh connections after 1/2 hour | |
# Add to cron to run every minute | |
# User needs sudo permission to run 'shutdown' | |
# | |
set -euo pipefail |