|
|
@ -398,20 +398,27 @@ fi |
|
|
|
while : |
|
|
|
while : |
|
|
|
do |
|
|
|
do |
|
|
|
msg "############### Running Harmony Process ###############" |
|
|
|
msg "############### Running Harmony Process ###############" |
|
|
|
if [ "$OS" == "Linux" ]; then |
|
|
|
args=( |
|
|
|
# Run Harmony Node |
|
|
|
-bootnodes "${BN_MA}" |
|
|
|
if [ -z "${blspass}" ]; then |
|
|
|
-ip "${PUB_IP}" |
|
|
|
echo -n "${passphrase}" | LD_LIBRARY_PATH=$(pwd) ./harmony -bootnodes $BN_MA -ip $PUB_IP -port $NODE_PORT -is_genesis -blskey_file "${BLSKEYFILE}" -blspass stdin -metrics $METRICS -pushgateway_ip $PUSHGATEWAY_IP -pushgateway_port $PUSHGATEWAY_PORT |
|
|
|
-port "${NODE_PORT}" |
|
|
|
else |
|
|
|
-is_genesis |
|
|
|
LD_LIBRARY_PATH=$(pwd) ./harmony -bootnodes $BN_MA -ip $PUB_IP -port $NODE_PORT -is_genesis -blskey_file "${BLSKEYFILE}" -blspass file:${blspass} -metrics $METRICS -pushgateway_ip $PUSHGATEWAY_IP -pushgateway_port $PUSHGATEWAY_PORT |
|
|
|
-blskey_file "${BLSKEYFILE}" |
|
|
|
fi |
|
|
|
-metrics "${metrics}" |
|
|
|
else |
|
|
|
-pushgateway_ip "${PUSHGATEWAY_IP}" |
|
|
|
if [ -z "${blspass}" ]; then |
|
|
|
-pushgateway_port "${PUSHGATEWAY_PORT}" |
|
|
|
echo -n "${passphrase}" | DYLD_FALLBACK_LIBRARY_PATH=$(pwd) ./harmony -bootnodes $BN_MA -ip $PUB_IP -port $NODE_PORT -is_genesis -blskey_file "${BLSKEYFILE}" -blspass stdin -metrics $METRICS -pushgateway_ip $PUSHGATEWAY_IP -pushgateway_port $PUSHGATEWAY_PORT |
|
|
|
) |
|
|
|
else |
|
|
|
case "$OS" in |
|
|
|
DYLD_FALLBACK_LIBRARY_PATH=$(pwd) ./harmony -bootnodes $BN_MA -ip $PUB_IP -port $NODE_PORT -is_genesis -blskey_file "${BLSKEYFILE}" -blspass file:${blspass} -metrics $METRICS -pushgateway_ip $PUSHGATEWAY_IP -pushgateway_port $PUSHGATEWAY_PORT |
|
|
|
Darwin) ld_path_var=DYLD_FALLBACK_LIBRARY_PATH;; |
|
|
|
fi |
|
|
|
*) ld_path_var=LD_LIBRARY_PATH;; |
|
|
|
fi || msg "node process finished with status $?" |
|
|
|
esac |
|
|
|
|
|
|
|
run() { |
|
|
|
|
|
|
|
env "${ld_path_var}=$(pwd)" ./harmony "${args[@]}" "${@}" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
case "${blspass:+set}" in |
|
|
|
|
|
|
|
"") echo -n "${passphrase}" | run -blspass stdin;; |
|
|
|
|
|
|
|
*) run -blspass file:${blspass};; |
|
|
|
|
|
|
|
esac || msg "node process finished with status $?" |
|
|
|
${loop} || break |
|
|
|
${loop} || break |
|
|
|
msg "restarting in 10s..." |
|
|
|
msg "restarting in 10s..." |
|
|
|
sleep 10 |
|
|
|
sleep 10 |
|
|
|