Use CHARM_DIR, which works with both juju-core and pyjuju

This commit is contained in:
Andreas Hasenack 2013-07-26 19:31:07 -03:00
parent 5fa3d241d2
commit 73c3357c0c
2 changed files with 3 additions and 3 deletions

View File

@ -221,8 +221,8 @@ def save_script_rc(script_path="scripts/scriptrc", **env_vars):
updated config information necessary to perform health checks or
service changes.
"""
unit_name = os.getenv('JUJU_UNIT_NAME').replace('/', '-')
juju_rc_path = "/var/lib/juju/units/%s/charm/%s" % (unit_name, script_path)
charm_dir = os.getenv('CHARM_DIR')
juju_rc_path = "%s/%s" % (charm_dir, script_path)
with open(juju_rc_path, 'wb') as rc_script:
rc_script.write(
"#!/bin/bash\n")

View File

@ -1 +1 @@
95
96