[binami/etcd] If container is run as root, only chown etcd.yaml config file if it exists. (#72249)
Signed-off-by: Ryan Koski <Ryan.Koski@target.com>
This commit is contained in:
parent
c20b8220a0
commit
31fe2f197a
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue