examples: improve shell session usability

- Add usage prompt when starting shell sessions

- Give all examples an uniform interface ("c") for running commands
  or starting a shell on the node.
This commit is contained in:
Erik Arvstedt
2020-05-17 23:46:44 +02:00
parent 719dcd77bb
commit 0f1ee5f533
3 changed files with 19 additions and 3 deletions

View File

@@ -62,7 +62,13 @@ in {
}
EOF
# Run command in container
c() { sudo extra-container run demo-node -- "$@" | cat; }
c() {
if [[ $# > 0 ]]; then
sudo extra-container run demo-node -- "$@" | cat;
else
sudo nixos-container root-login demo-node
fi
}
echo
echo "Bitcoind service:"