~ahasenack/charms/precise/landscape-client/client-charm-doc

« back to all changes in this revision

Viewing changes to hooks/start

  • Committer: Thomas Hervé
  • Date: 2012-05-02 21:14:03 UTC
  • Revision ID: thomas@canonical.com-20120502211403-ungzygyh176h7njh
Remove start hook

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
 
3
 
import os
4
 
from subprocess import check_output
5
 
import json
6
 
 
7
 
configs = json.loads(check_output(["config-get", "--format=json"]))
8
 
if configs:
9
 
    if not configs.get("computer-title"):
10
 
        configs["computer-title"] = os.environ["JUJU_UNIT_NAME"]
11
 
    options = ["--%s=%s" % (key, value) for key, value in configs.items()]
12
 
 
13
 
    args = ["landscape-config", "--silent"]
14
 
    args.extend(options)
15
 
    check_output(args)
 
1
#!/bin/bash