|
|
|
@ -102,6 +102,17 @@ function openim::tools::start_service() {
|
|
|
|
|
fi
|
|
|
|
|
openim::log::status "Starting binary ${binary_name}..."
|
|
|
|
|
${cmd} | tee -a "${LOG_FILE}"
|
|
|
|
|
ehco "11111111111111file: " ${LOG_FILE} $TMP_LOG_FILE
|
|
|
|
|
${cmd} >> "${LOG_FILE}" 2>&1
|
|
|
|
|
local status=$?
|
|
|
|
|
|
|
|
|
|
if [ $status -eq 0 ]; then
|
|
|
|
|
openim::log::info "Service ${binary_name} started successfully."
|
|
|
|
|
return 0
|
|
|
|
|
else
|
|
|
|
|
openim::log::error "Failed to start service ${binary_name}."
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function openim::tools::start() {
|
|
|
|
@ -118,8 +129,12 @@ function openim::tools::pre-start() {
|
|
|
|
|
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::tools::start_service ${tool} ${OPNEIM_CONFIG}
|
|
|
|
|
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."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function openim::tools::post-start() {
|
|
|
|
|