Skip to content

Commit

Permalink
exit on exception
Browse files Browse the repository at this point in the history
  • Loading branch information
boqiu committed Dec 3, 2024
1 parent 1108e6c commit 7b6a0a1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions run/zgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ case $1 in
if [[ "$pid" = "" ]]; then
if [ ! -f .env ]; then
echo ".env file not found"
exit 1
fi

source .env

if [[ "$ZGS_NODE__MINER_KEY" = "" ]]; then echo "ZGS_NODE__MINER_KEY not specified in .env file"; fi
if [[ "$ZGS_NODE__BLOCKCHAIN_RPC_ENDPOINT" = "" ]]; then echo "ZGS_NODE__BLOCKCHAIN_RPC_ENDPOINT not specified in .env file"; fi
if [[ "$ZGS_NODE__MINER_KEY" = "" ]]; then
echo "ZGS_NODE__MINER_KEY not specified in .env file"
exit 1
fi

if [[ "$ZGS_NODE__BLOCKCHAIN_RPC_ENDPOINT" = "" ]]; then
echo "ZGS_NODE__BLOCKCHAIN_RPC_ENDPOINT not specified in .env file"
exit 1
fi

nohup ../target/release/zgs_node --config config-testnet-turbo.toml \
--log-config-file log_config_debug \
Expand Down

0 comments on commit 7b6a0a1

Please sign in to comment.