From 41aa9e1cd2aa5ff2d83aaa4f7378e7a0b63cb5ea Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 24 Mar 2020 18:08:34 -0400 Subject: [PATCH] Optimize chown chown does not need to be called recursively every update/install. --- confluent_server/confluent_server.spec.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent_server.spec.tmpl b/confluent_server/confluent_server.spec.tmpl index 6cab3a7f..ea2b2c0d 100644 --- a/confluent_server/confluent_server.spec.tmpl +++ b/confluent_server/confluent_server.spec.tmpl @@ -58,7 +58,7 @@ true getent group confluent > /dev/null || /usr/sbin/groupadd -r confluent getent passwd confluent > /dev/null || /usr/sbin/useradd -r -g confluent -d /var/lib/confluent -s /sbin/nologin confluent mkdir -p /etc/confluent /var/lib/confluent /var/log/confluent /var/cache/confluent -chown -R confluent:confluent /etc/confluent /var/lib/confluent /var/log/confluent /var/cache/confluent +chown confluent:confluent /etc/confluent /var/lib/confluent /var/log/confluent /var/cache/confluent %post sysctl -p /usr/lib/sysctl.d/confluent.conf >& /dev/null @@ -73,7 +73,7 @@ if [ $NEEDCHOWN = 1 ]; then NEEDSTART=1 systemctl stop confluent fi - chown -R confluent:confluent /etc/confluent /var/lib/confluent /var/log/confluent /var/cache/confluent + chown -R confluent:confluent /etc/confluent /var/log/confluent /var/cache/confluent fi systemctl daemon-reload if systemctl is-active confluent > /dev/null || [ $NEEDSTART = 1 ]; then /usr/bin/systemctl restart confluent >& /dev/null; fi