mirror of
https://github.com/bitnami/containers.git
synced 2026-03-01 06:57:49 +08:00
[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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user