Skip to content

Commit

Permalink
[binami/etcd] If container is run as root, only chown etcd.yaml confi…
Browse files Browse the repository at this point in the history
…g file if it exists.

Signed-off-by: Ryan Koski <Ryan.Koski@target.com>
  • Loading branch information
ryankoski-at-work committed Sep 6, 2024
1 parent f881595 commit 0488a07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ etcd_setup_from_environment_variables() {
fi
fi
done
if am_i_root; then
if am_i_root && [[ -f "$ETCD_CONF_FILE" ]] ; then
chown "$ETCD_DAEMON_USER" "$ETCD_CONF_FILE"
fi
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ etcd_setup_from_environment_variables() {
fi
fi
done
if am_i_root; then
if am_i_root && [[ -f "$ETCD_CONF_FILE" ]] ; then
chown "$ETCD_DAEMON_USER" "$ETCD_CONF_FILE"
fi
}
Expand Down

0 comments on commit 0488a07

Please sign in to comment.