mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
contrib: Make cowsay answer 'init'
__________________________________ < I was not plugin specs compliant > ---------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||
This commit is contained in:
parent
3491a98cca
commit
05a747c5ba
@ -24,6 +24,9 @@ echo '{"jsonrpc":"2.0","id":'"$id"',"result":{"dynamic":true,"options":[],"rpcme
|
|||||||
# Eg. {"jsonrpc":"2.0","id":5,"method":"init","params":{"options":{},"configuration":{"lightning-dir":"/home/rusty/.lightning","rpc-file":"lightning-rpc","startup":false}}}\n\n
|
# Eg. {"jsonrpc":"2.0","id":5,"method":"init","params":{"options":{},"configuration":{"lightning-dir":"/home/rusty/.lightning","rpc-file":"lightning-rpc","startup":false}}}\n\n
|
||||||
read -r JSON
|
read -r JSON
|
||||||
read -r _
|
read -r _
|
||||||
|
id=$(echo "$JSON" | sed 's/.*"id" *: *\([0-9]*\),.*/\1/')
|
||||||
|
|
||||||
|
echo '{"jsonrpc":"2.0","id":'"$id"',"result":{}}'
|
||||||
|
|
||||||
# eg. { "jsonrpc" : "2.0", "method" : "cowsay", "id" : 6, "params" :[ "hello"] }
|
# eg. { "jsonrpc" : "2.0", "method" : "cowsay", "id" : 6, "params" :[ "hello"] }
|
||||||
while read -r JSON; do
|
while read -r JSON; do
|
||||||
|
Loading…
Reference in New Issue
Block a user