Explorar el Código

Fix log manager script

pull/33/head
Kristijan Mitrovic hace 4 años
padre
commit
42ee2df45c
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. +5
    -5
      bubble-server/src/main/resources/packer/roles/bubble/files/log_manager.sh

+ 5
- 5
bubble-server/src/main/resources/packer/roles/bubble/files/log_manager.sh Ver fichero

@@ -31,9 +31,9 @@ REDIS_LOG_FLAG=$(test "${REDIS_LOG_FLAG_VALUE}" == "true" && echo true || echo f


function setLoggingForSupervisorConfig {
cfgFile=${1}
logFlag=${2}
tmpFile=$(mktemp /tmp/bubble.log_manager.XXXXXX)
cfgFile="${1}"
logFlag="${2}"
tmpFile="$(mktemp /tmp/bubble.log_manager.XXXXXX)"

while IFS= read -r line; do
if [[ ${line} == std???_logfile* ]]; then
@@ -54,7 +54,7 @@ function setLoggingForSupervisorConfig {
echo "${line}" >> "${tmpFile}"
fi
done < "${cfgFile}"
cat $(tmpFile) > "${cfgFile}"
cat "${tmpFile}" > "${cfgFile}"

rm "${tmpFile}"
}
@@ -70,5 +70,5 @@ fi

if [[ "${REDIS_LOG_FLAG}" != "true" ]]; then
# truncate tmp bubble log files each time as those might have some output in between:
ls "${BUBBLE_LOGS_FOLDER}/*" | xargs truncate -c - s0
ls ${BUBBLE_LOGS_FOLDER}/* | xargs truncate -c -s0
fi

Cargando…
Cancelar
Guardar