mirror of https://github.com/apache/nifi.git
NIFI-1817 Respecting when run.as is commented out by ensuring the chosen line starts with run.as optionally preceded by whitespace
This closes #383.
This commit is contained in:
parent
eded0de154
commit
6938c3db54
|
@ -164,7 +164,7 @@ run() {
|
|||
BOOTSTRAP_CONF="${BOOTSTRAP_CONF_DIR}/bootstrap.conf";
|
||||
BOOTSTRAP_LIBS="${NIFI_HOME}/lib/bootstrap/*"
|
||||
|
||||
run_as=$(grep run.as "${BOOTSTRAP_CONF}" | cut -d'=' -f2)
|
||||
run_as=$(grep '^\s*run.as' "${BOOTSTRAP_CONF}" | cut -d'=' -f2)
|
||||
# If the run as user is the same as that starting the process, ignore this configuration
|
||||
if [ "$run_as" = "$(whoami)" ]; then
|
||||
unset run_as
|
||||
|
|
Loading…
Reference in New Issue