If we create the log dir chown it to log file owner

This commit is contained in:
Philip 2015-01-18 14:50:35 +00:00
parent f4000f9c36
commit d3c21028b0

View file

@ -281,6 +281,14 @@ check_logdir()
else
echo "Directory ${LOGDIR} successfully created."
fi
echo "Attempting to change owner:group of ${LOGDIR} to ${LOG_FILE_OWNER} ..."
if ! chown ${LOG_FILE_OWNER} ${LOGDIR}; then
echo "User ${USER} could not change the owner:group of ${LOGDIR} to $LOG_FILE_OWNER"
echo "Aborting..."
exit 1
else
echo "Directory ${LOGDIR} successfully changed to owner:group of ${LOG_FILE_OWNER}"
fi
elif [ ! -w ${LOGDIR} ]; then
echo "Log directory ${LOGDIR} is not writeable by this user: ${USER}"
echo "Aborting..."