Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC2 Shutdown when no users are logged in #43

Open
pathawks opened this issue Jul 16, 2018 · 0 comments
Open

EC2 Shutdown when no users are logged in #43

pathawks opened this issue Jul 16, 2018 · 0 comments

Comments

@pathawks
Copy link
Member

After the EC2 instance has processed all messages in the queue, it should shutdown. However, there are times when I need to login manually to perform some maintenance and I do not want the EC2 instance to shutdown while I am logged in.

I have never gotten this to work reliably. Either the instance will shutdown whether or not I am logged in, or it will never automatically shutdown and I will need to manually reboot the instance to get it to start processing messages from the queue again.

If anybody knows of a reliable way to check if there are any interactive sessions, that would really help.

Utterson/aws/ec2/boot

Lines 13 to 16 in d24ee3e

if (( USERS = 0 )); then
wall "Shutting down."
shutdown -h now
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant