Index: hooks/stop |
=== modified file 'hooks/stop' |
--- hooks/stop 2012-11-20 11:58:00 +0000 |
+++ hooks/stop 2012-12-03 10:02:45 +0000 |
@@ -1,6 +1,7 @@ |
#!/usr/bin/env python2 |
from charmhelpers import ( |
+ get_config, |
log, |
log_entry, |
log_exit, |
@@ -12,10 +13,16 @@ |
def stop(): |
"""Stop the Juju API agent.""" |
- log('Stopping Juju API agent.') |
+ config = get_config() |
with su('root'): |
+ log('Stopping Juju GUI.') |
service_control('juju-gui', STOP) |
- service_control('juju-api-improv', STOP) |
+ if config.get('staging'): |
+ log('Stopping the staging backend.') |
+ service_control('juju-api-improv', STOP) |
+ else: |
+ log('Stopping API agent.') |
+ service_control('juju-api-agent', STOP) |
if __name__ == '__main__': |