From 0a9accccc105a2576dab1338c2e3a849e0707d50 Mon Sep 17 00:00:00 2001 From: Ross McDonald Date: Wed, 2 Mar 2016 11:16:30 -0600 Subject: [PATCH] Added permissions check to post-install script due to issues with RPMs having the incorrect permissions on the log directory. --- scripts/post-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/post-install.sh b/scripts/post-install.sh index 4f11fe8f6..0982dc855 100644 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -28,7 +28,9 @@ if [[ $? -ne 0 ]]; then useradd --system -U -M telegraf -s /bin/false -d /etc/telegraf fi +test -d $LOG_DIR || mkdir -p $LOG_DIR chown -R -L telegraf:telegraf $LOG_DIR +chmod 755 $LOG_DIR # Remove legacy symlink, if it exists if [[ -L /etc/init.d/telegraf ]]; then