Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(318)

Unified Diff: hooks/stop

Issue 6846132: Juju GUI charm connects to its environment
Patch Set: Juju GUI charm connects to its environment Created 12 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « hooks/start ('k') | hooks/utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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__':
« no previous file with comments | « hooks/start ('k') | hooks/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b