[debug] debug init.sh
This commit is contained in:
parent
49a9af72d5
commit
ee196716dd
@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
LACONIC_BIN=${LACONIC_BIN:-laconicd}
|
LACONIC_BIN=${LACONIC_BIN:-laconicd}
|
||||||
LACONIC_HOME="${LACONIC_HOME:-$HOME/.laconicd}"
|
LACONIC_HOME="${LACONIC_HOME:-$HOME/.laconicd}"
|
||||||
|
|
||||||
@ -17,13 +21,18 @@ laconicd="$LACONIC_BIN --home=$LACONIC_HOME --log_level=debug"
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
hang() {
|
||||||
|
tail -f /dev/null
|
||||||
|
}
|
||||||
|
trap hang EXIT
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
sed_i="sed -i ''"
|
sed_i="sed -i ''"
|
||||||
else
|
else
|
||||||
sed_i="sed -i"
|
sed_i="sed -i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "clean" ] || [ ! -d "$LACONIC_HOME/data/blockstore.db" ]; then
|
if [[ "$1" == "clean" ]] || [[ ! -d "$LACONIC_HOME/data/blockstore.db" ]]; then
|
||||||
# validate dependencies are installed
|
# validate dependencies are installed
|
||||||
command -v jq > /dev/null 2>&1 || {
|
command -v jq > /dev/null 2>&1 || {
|
||||||
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
|
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
|
||||||
@ -152,7 +161,7 @@ fi
|
|||||||
|
|
||||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||||
# TODO new pruning config
|
# TODO new pruning config
|
||||||
exec $laconicd start \
|
$laconicd start \
|
||||||
--log_level "$LOGLEVEL" \
|
--log_level "$LOGLEVEL" \
|
||||||
--server.minimum-gas-prices="1$DENOM" \
|
--server.minimum-gas-prices="1$DENOM" \
|
||||||
--rpc.laddr="tcp://0.0.0.0:26657" \
|
--rpc.laddr="tcp://0.0.0.0:26657" \
|
||||||
|
Loading…
Reference in New Issue
Block a user