summaryrefslogtreecommitdiffstats
path: root/bin/nova-api
diff options
context:
space:
mode:
authorKevin L. Mitchell <kevin.mitchell@rackspace.com>2011-07-08 12:21:26 -0500
committerKevin L. Mitchell <kevin.mitchell@rackspace.com>2011-07-08 12:21:26 -0500
commite7bc748edef30b106628946eeda36818aac4fe9d (patch)
tree77f929875ff5fe81d34e07e57a11bbcf641b14a4 /bin/nova-api
parentfbf4d26bc9bd038eeea270846bdc8003abf3b527 (diff)
parent42765b2763260a9cae702585df1f0b9343937284 (diff)
downloadnova-e7bc748edef30b106628946eeda36818aac4fe9d.tar.gz
nova-e7bc748edef30b106628946eeda36818aac4fe9d.tar.xz
nova-e7bc748edef30b106628946eeda36818aac4fe9d.zip
pull-up from trunk
Diffstat (limited to 'bin/nova-api')
-rwxr-xr-xbin/nova-api4
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: