From 37e4043f2f7174dd91ccc3d88786d5a8d2370d94 Mon Sep 17 00:00:00 2001 From: Denis Kolegov Date: Tue, 18 Apr 2023 10:39:39 +0300 Subject: [PATCH] fix env in scripts (#159) --- scripts/mir/4-node-net.sh | 3 +++ scripts/mir/validator.sh | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/mir/4-node-net.sh b/scripts/mir/4-node-net.sh index 9c13a94175..c00466185a 100755 --- a/scripts/mir/4-node-net.sh +++ b/scripts/mir/4-node-net.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +n=`date '+%Y-%m-%dT%T'` +export MIR_INTERCEPTOR_OUTPUT="mir-event-logs/run-$n" + tmux new-session -d -s "mir" \; \ new-window -t "mir" \; \ split-window -t "mir:0" -v \; \ diff --git a/scripts/mir/validator.sh b/scripts/mir/validator.sh index 6aeb1bca47..f23c39495d 100755 --- a/scripts/mir/validator.sh +++ b/scripts/mir/validator.sh @@ -26,9 +26,10 @@ cp ./scripts/mir/mir-config/node$INDEX/* $LOTUS_PATH mkdir $LOTUS_PATH/mir.db # Set interceptor output -n=$(cat mir-event-logs/counter) -export MIR_INTERCEPTOR_OUTPUT="mir-event-logs/run-${n}" -echo $((n + 1)) > mir-event-logs/counter +if [[ -z "${MIR_INTERCEPTOR_OUTPUT}" ]]; then + n=`date '+%Y-%m-%dT%T'` + MIR_INTERCEPTOR_OUTPUT="mir-event-logs/run/$INDEX/$n" +fi # Run validator ./eudico mir validator run --nosync --max-block-delay="1s"