Commit c5dc477f authored by Ryan Taylor's avatar Ryan Taylor

include rough example script for node admin via CLI

parent c90cfe65
#!/bin/bash
# This is a rough example script showing how to send admin commands to nodes via CLI.
node=$1
if [[ -n "$2" ]] ; then
command="$2"
else
command="slot-info"
fi
# Valid commands include: finish, ...
passphrase="insert passphrase here"
# awk strip out everything except what's in between square brackets, print it in square brackets.
# RS is to process all lines as one.
# jq complains if booleans are capitalized so replace with sed.
echo -e "auth $passphrase \n $command" | nc $node 36330 | awk -F"[][]" -v RS="" '{print "[" $4 "]"}' | sed 's/False/false/g; s/True/true/g'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment