diff options
| author | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-07-08 12:21:26 -0500 |
|---|---|---|
| committer | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-07-08 12:21:26 -0500 |
| commit | e7bc748edef30b106628946eeda36818aac4fe9d (patch) | |
| tree | 77f929875ff5fe81d34e07e57a11bbcf641b14a4 /bin/nova-api | |
| parent | fbf4d26bc9bd038eeea270846bdc8003abf3b527 (diff) | |
| parent | 42765b2763260a9cae702585df1f0b9343937284 (diff) | |
| download | nova-e7bc748edef30b106628946eeda36818aac4fe9d.tar.gz nova-e7bc748edef30b106628946eeda36818aac4fe9d.tar.xz nova-e7bc748edef30b106628946eeda36818aac4fe9d.zip | |
pull-up from trunk
Diffstat (limited to 'bin/nova-api')
| -rwxr-xr-x | bin/nova-api | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/nova-api b/bin/nova-api index fff67251f..4c5164ea1 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -24,8 +24,10 @@ Starts both the EC2 and OpenStack APIs in separate processes. """ import os +import signal import sys + possible_topdir = os.path.normpath(os.path.join(os.path.abspath( sys.argv[0]), os.pardir, os.pardir)) if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): @@ -46,6 +48,8 @@ def main(): launcher.launch_service(ec2) launcher.launch_service(osapi) + signal.signal(signal.SIGTERM, lambda *_: launcher.stop()) + try: launcher.wait() except KeyboardInterrupt: |
