tokenbridge/oracle/scripts/start-worker.sh
Przemyslaw Rzad d656025378
Update the token-bridge sub-repo (#19)
* Moved audit to root directory.

* Moved code of conduct, contributing and licence files.

* Removed travis config and badge.

* Updated repository links in CONTRIBUTING.

* Moved Gitter badge to main readme. Updated links to contributing and licence.

* Updated main readme.

* Moved references to main readme.

* Renamed token-bridge to oracle.

* Update README.md

Co-Authored-By: rzadp <rzadp@student.mini.pw.edu.pl>
2019-05-07 16:52:44 +02:00

19 lines
367 B
Bash
Executable File

#!/usr/bin/env bash
set -o pipefail
WORKERS_DIR="src/"
LOGS_DIR="logs/"
WORKER="${WORKERS_DIR}${1}.js"
CONFIG="${2}.config.js"
LOG="${LOGS_DIR}${2}.txt"
CHECKS=$(node scripts/initialChecks.js)
if [ "${NODE_ENV}" = "production" ]; then
exec node "${WORKER}" "${CONFIG}" "$CHECKS"
else
node "${WORKER}" "${CONFIG}" "$CHECKS" | tee -a "${LOG}" | pino-pretty
fi