Skip to content

Commit

Permalink
Source env.sh when JIT config is used
Browse files Browse the repository at this point in the history
When the runner gets set up via config.sh or when the run.sh script
is used with a JIT config, the env.sh script is sourced, setting up some
environment files inside the runner folder. This change emulates that.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
  • Loading branch information
gabriel-samfira committed Nov 14, 2024
1 parent 5b7633d commit 16495ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloudconfig/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ fi
AGENT_ID=""
{{- if .UseJITConfig }}
if [ -f "$RUN_HOME/env.sh" ];then
pushd $RUN_HOME
source env.sh
popd
fi
sudo systemctl start $SVC_NAME || fail "failed to start service"
{{- else}}
sendStatus "starting service"
Expand Down

0 comments on commit 16495ba

Please sign in to comment.