Merge "Add SYSTEMD_ENV_VARS dictionary"
This commit is contained in:
@@ -43,6 +43,9 @@ declare -A -g GITREPO
|
|||||||
declare -A -g GITBRANCH
|
declare -A -g GITBRANCH
|
||||||
declare -A -g GITDIR
|
declare -A -g GITDIR
|
||||||
|
|
||||||
|
# Systemd service file environment variables per service
|
||||||
|
declare -A -g SYSTEMD_ENV_VARS
|
||||||
|
|
||||||
KILL_PATH="$(which kill)"
|
KILL_PATH="$(which kill)"
|
||||||
|
|
||||||
# Save these variables to .stackenv
|
# Save these variables to .stackenv
|
||||||
@@ -1642,6 +1645,9 @@ function _run_under_systemd {
|
|||||||
user=$STACK_USER
|
user=$STACK_USER
|
||||||
fi
|
fi
|
||||||
local env_vars="$5"
|
local env_vars="$5"
|
||||||
|
if [[ -v SYSTEMD_ENV_VARS[$service] ]]; then
|
||||||
|
env_vars="${SYSTEMD_ENV_VARS[$service]} $env_vars"
|
||||||
|
fi
|
||||||
if [[ "$command" =~ "uwsgi" ]] ; then
|
if [[ "$command" =~ "uwsgi" ]] ; then
|
||||||
if [[ "$GLOBAL_VENV" == "True" ]] ; then
|
if [[ "$GLOBAL_VENV" == "True" ]] ; then
|
||||||
cmd="$cmd --venv $DEVSTACK_VENV"
|
cmd="$cmd --venv $DEVSTACK_VENV"
|
||||||
|
Reference in New Issue
Block a user