Optimizing Docker Log Output Detection

This commit is contained in:
skiffer-git 2024-03-07 14:46:10 +08:00
parent 1b1721e129
commit 04bddeb3b3
2 changed files with 3 additions and 11 deletions

View File

@ -26,12 +26,8 @@
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${OPENIM_ROOT}/scripts/install/common.sh" source "${OPENIM_ROOT}/scripts/install/common.sh"
if openim::util::is_running_in_container; then if is_running_in_container; then
echo "container!!!!11111111111"
exec > ${DOCKER_LOG_FILE} 2>&1 exec > ${DOCKER_LOG_FILE} 2>&1
else
echo "host!!!!11111111111"
fi fi
@ -79,7 +75,7 @@ if grep -qE 'docker|kubepods' /proc/1/cgroup || [ -f /.dockerenv ]; then
openim::color::echo ${COLOR_CYAN} "Environment in the interior of the container" openim::color::echo ${COLOR_CYAN} "Environment in the interior of the container"
else else
openim::color::echo ${COLOR_CYAN} "The environment is outside the container" openim::color::echo ${COLOR_CYAN} "The environment is outside the container"
openim::util::check_ports ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]} || return 0 openim::util::check_ports ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}
fi fi
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then

View File

@ -62,12 +62,8 @@ function execute_start_scripts() {
if openim::util::is_running_in_container; then if is_running_in_container; then
echo "container!!!!11111111111"
exec > ${DOCKER_LOG_FILE} 2>&1 exec > ${DOCKER_LOG_FILE} 2>&1
else
echo "host!!!!11111111111"
fi fi