From f6b004c44ce97fba9abcb4f076d0644a462e9fc0 Mon Sep 17 00:00:00 2001 From: okjodom Date: Tue, 18 Jul 2023 18:33:51 -0700 Subject: [PATCH 1/3] fix: yarn nix commands --- package.json | 4 ++-- scripts/mprocs-nix.sh | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f62f6ca67..d07411e6d 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "lint": "turbo run lint", "test": "turbo run test", "prepare": "husky install", - "nix-guardian": "./scripts/mprocs-nix.sh dev-fed mprocs-nix-gateway.yml", - "nix-gateway": "./scripts/mprocs-nix.sh run-ui mprocs-nix-gateway.yml", + "nix-guardian": "./scripts/mprocs-nix.sh run-ui mprocs-nix-guardian.yml", + "nix-gateway": "./scripts/mprocs-nix.sh dev-fed mprocs-nix-gateway.yml", "mprocs": "mprocs -c ./mprocs.yml" }, "devDependencies": { diff --git a/scripts/mprocs-nix.sh b/scripts/mprocs-nix.sh index 026324d0b..3006a53ad 100755 --- a/scripts/mprocs-nix.sh +++ b/scripts/mprocs-nix.sh @@ -13,13 +13,12 @@ export FM_FED_SIZE=4 export FM_PID_FILE="$FM_TEST_DIR/.pid" export FM_LOGS_DIR="$FM_TEST_DIR/logs" -devimint dev-fed 2>/dev/null & - mkdir $FM_TEST_DIR mkdir $FM_LOGS_DIR touch $FM_PID_FILE echo $! >> $FM_PID_FILE -eval "$(devimint $DEVIMINT_COMMAND)" + +eval "$(devimint $DEVIMINT_COMMAND)" 2>/dev/null & # Function for killing processes stored in FM_PID_FILE in reverse-order they were created in function kill_fedimint_processes { From eb39044fa528195dc16198b83b8f1f15e5d17d6e Mon Sep 17 00:00:00 2001 From: Justin Moon Date: Wed, 19 Jul 2023 11:56:46 -0500 Subject: [PATCH 2/3] fix: change order of writing to PID file --- scripts/mprocs-nix.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/mprocs-nix.sh b/scripts/mprocs-nix.sh index 3006a53ad..3311ec383 100755 --- a/scripts/mprocs-nix.sh +++ b/scripts/mprocs-nix.sh @@ -16,9 +16,10 @@ export FM_LOGS_DIR="$FM_TEST_DIR/logs" mkdir $FM_TEST_DIR mkdir $FM_LOGS_DIR touch $FM_PID_FILE -echo $! >> $FM_PID_FILE eval "$(devimint $DEVIMINT_COMMAND)" 2>/dev/null & +echo $! >> $FM_PID_FILE + # Function for killing processes stored in FM_PID_FILE in reverse-order they were created in function kill_fedimint_processes { From 9f8760a4ba3a6c8e77f422068d7a0e35f964645c Mon Sep 17 00:00:00 2001 From: Justin Moon Date: Wed, 19 Jul 2023 12:02:33 -0500 Subject: [PATCH 3/3] chore: change devimint command --- scripts/mprocs-nix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mprocs-nix.sh b/scripts/mprocs-nix.sh index 3311ec383..461ce32f4 100755 --- a/scripts/mprocs-nix.sh +++ b/scripts/mprocs-nix.sh @@ -17,7 +17,7 @@ mkdir $FM_TEST_DIR mkdir $FM_LOGS_DIR touch $FM_PID_FILE -eval "$(devimint $DEVIMINT_COMMAND)" 2>/dev/null & +devimint $DEVIMINT_COMMAND 2>/dev/null & echo $! >> $FM_PID_FILE