I have setup a auto scaled load balanced application on Amazon EC2. I want to collect the logs from the auto scaled instances before automatic termination of the instances.
I have a script which transfers files from the auto scaled instances to a Centralize log server. I want to run the script on shutdown or reboot of the instances. I am using Fedora, please let me know how to run the script on shutdown after all the user process have been stopped ?