added logic to handle terminate actions more flexibly
Merge pull request #5 from enStratus/terminate_server

added logic to handle terminate actions more flexibly