Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
arbutus-nt
TerraFold
Commits
c5dc477f
Commit
c5dc477f
authored
Oct 13, 2020
by
Ryan Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include rough example script for node admin via CLI
parent
c90cfe65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
node-admin-cli.sh
node-admin-cli.sh
+21
-0
No files found.
node-admin-cli.sh
0 → 100644
View file @
c5dc477f
#!/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'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment