Use CHARM_DIR instead of a hardcoded path for the charm directory. This makes
the charm compatible with both juju and juju-core.
This commit is contained in:
parent
5c1d7dfd21
commit
bac9d3a41d
@ -762,7 +762,8 @@ function save_script_rc {
|
||||
exit 1
|
||||
fi
|
||||
# our default unit_path
|
||||
unit_path="/var/lib/juju/units/${JUJU_UNIT_NAME/\//-}/charm/scripts/scriptrc"
|
||||
mkdir -p "$CHARM_DIR/scripts"
|
||||
unit_path="$CHARM_DIR/scripts/scriptrc"
|
||||
echo $unit_path
|
||||
tmp_rc="/tmp/${JUJU_UNIT_NAME/\//-}rc"
|
||||
|
||||
@ -771,7 +772,7 @@ function save_script_rc {
|
||||
do
|
||||
if `echo $env_var | grep -q script_path`; then
|
||||
# well then we need to reset the new unit-local script path
|
||||
unit_path="/var/lib/juju/units/${JUJU_UNIT_NAME/\//-}/charm/${env_var/script_path=/}"
|
||||
unit_path="$CHARM_DIR/${env_var/script_path=/}"
|
||||
else
|
||||
echo "export $env_var" >> $tmp_rc
|
||||
fi
|
||||
|
2
revision
2
revision
@ -1 +1 @@
|
||||
261
|
||||
262
|
||||
|
Loading…
x
Reference in New Issue
Block a user