Update openim-tools.sh

pull/1758/head
Xinwei Xiong 2 years ago committed by GitHub
parent 0aae970298
commit 266237861b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -103,8 +103,13 @@ function openim::tools::start_service() {
printf "Specifying prometheus port: %s\n" "${prometheus_port}"
cmd="${cmd} --prometheus_port ${prometheus_port}"
fi
openim::log::info "Starting ${binary_name}..."
${cmd} >> "${LOG_FILE}" 2>&1 &
openim::log::status "Starting ${binary_name}..."
# Later, after discarding Docker, the Docker keyword is unreliable, and Kubepods is used
if grep -qE 'docker|kubepods' /proc/1/cgroup || [ -f /.dockerenv ]; then
${cmd} >> "${LOG_FILE}" 2>&1
else
${cmd} | tee -a "${LOG_FILE}"
fi
}
function openim::tools::start() {

Loading…
Cancel
Save