Skip to content

Commit

Permalink
make tezos-client command work without passing client dir as param (#369
Browse files Browse the repository at this point in the history
)

This is very neat because I can open a shell into the node or baker and
type `tezos-client list known addresses` and it just works.

Q: why a symink instead of moving the actual dir to
/home/tezos/.tezos-client ?

A: the potential for breakage is high if we move the dir. This makes the
startup script a bit longer but there is virtually no risk of breakage.
  • Loading branch information
nicolasochem authored Feb 22, 2022
1 parent 0b98e24 commit e76713a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/tezos/scripts/baker-endorser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ my_baker_account="$(cat /etc/tezos/baker-account )"
CLIENT="$TEZ_BIN/tezos-client -d $CLIENT_DIR"
CMD="$TEZ_BIN/tezos-$DAEMON-$proto_command -d $CLIENT_DIR"

# ensure we can run tezos-client commands without specifying client dir
ln -s /var/tezos/client /home/tezos/.tezos-client

while ! $CLIENT rpc get chains/main/blocks/head; do
sleep 5
done
Expand Down
2 changes: 2 additions & 0 deletions charts/tezos/scripts/tezos-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ set -x

set

# ensure we can run tezos-client commands without specifying client dir
ln -s /var/tezos/client /home/tezos/.tezos-client
#
# Not every error is fatal on start. In particular, with zerotier,
# the listen-addr may not yet be bound causing tezos-node to fail.
Expand Down

0 comments on commit e76713a

Please sign in to comment.