Use the environment variable CHARM_DIR instead of a hardcoded value. The
previous value was not compatible with juju-core.
This commit is contained in:
parent
0005ae3124
commit
ea38b9eb45
@ -221,8 +221,8 @@ def save_script_rc(script_path="scripts/scriptrc", **env_vars):
|
|||||||
updated config information necessary to perform health checks or
|
updated config information necessary to perform health checks or
|
||||||
service changes.
|
service changes.
|
||||||
"""
|
"""
|
||||||
unit_name = os.getenv('JUJU_UNIT_NAME').replace('/', '-')
|
charm_dir = os.getenv('CHARM_DIR')
|
||||||
juju_rc_path = "/var/lib/juju/units/%s/charm/%s" % (unit_name, script_path)
|
juju_rc_path = "%s/%s" % (charm_dir, script_path)
|
||||||
with open(juju_rc_path, 'wb') as rc_script:
|
with open(juju_rc_path, 'wb') as rc_script:
|
||||||
rc_script.write(
|
rc_script.write(
|
||||||
"#!/bin/bash\n")
|
"#!/bin/bash\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user