Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # start the B3 instance and sleep a bit: give it time to crash (if that's the case).
- # recompute also the PID file path because $(b3_pid_path) may output an empty string
- # if the B3 was not running (and thus no PID file could be found in previous call)
- local SCREEN="${COMMON_PREFIX}${B3}"
- local PROCESS="$(readlink -f "${B3_RUN}")"
- local PID_FILE="$(readlink -f "${PID_PATH}/${COMMON_PREFIX}${B3}${PID_EXT}")"
- if [ ${AUTO_RESTART} -eq 1 ]; then
- screen -DmS "${SCREEN}" python "${PROCESS}" --restart --config "${CONFIG_FILE}" &
- else
- screen -DmS "${SCREEN}" python "${PROCESS}" --config "${CONFIG_FILE}" &
- fi
- echo "${!}" > "${PID_FILE}"
- if [ ${AUTO_RESTART} -eq 1 ]; then
- sleep 4
- else
- sleep 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement