mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +08:00
Optimizing scripts
This commit is contained in:
parent
04ccfa575e
commit
2bf3c781eb
@ -129,15 +129,15 @@ function openim::tools::start() {
|
||||
|
||||
|
||||
function openim::tools::pre-start() {
|
||||
openim::log::info "Preparing to start OpenIM Tools..."
|
||||
#openim::log::info "Preparing to start OpenIM Tools..."
|
||||
for tool in "${OPENIM_TOOLS_PRE_START_NAME_LISTARIES[@]}"; do
|
||||
openim::log::info "Starting tool ${tool}..."
|
||||
openim::log::colorless "Starting tool: ${tool}"
|
||||
if ! openim::tools::start_service ${tool} ${OPNEIM_CONFIG}; then
|
||||
openim::log::error "Failed to start ${tool}, aborting..."
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
openim::log::info "All tools started successfully."
|
||||
#openim::log::info "All tools started successfully."
|
||||
}
|
||||
|
||||
function openim::tools::post-start() {
|
||||
|
||||
@ -244,3 +244,14 @@ function openim::log::print_blue() {
|
||||
echo -e "\033[0;36m$1\033[0m"
|
||||
}
|
||||
|
||||
|
||||
openim::log::colorless() {
|
||||
local V="${V:-0}"
|
||||
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
||||
return
|
||||
fi
|
||||
timestamp=$(date +"[%Y-%m-%d %H:%M:%S %Z]")
|
||||
echo_log -e "${timestamp} ${1} "
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ if ! ${TOOLS_START_SCRIPTS_PATH} openim::tools::pre-start; then
|
||||
fi
|
||||
|
||||
|
||||
openim::log::status "Preprocessing has been successfully completed."
|
||||
openim::log::success "Preprocessing has been successfully completed."
|
||||
|
||||
result=$("${OPENIM_ROOT}"/scripts/stop-all.sh)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user