Skip to content

Instantly share code, notes, and snippets.

@plowsof
Last active December 8, 2022 07:04
Show Gist options
  • Save plowsof/3bfc30068a254e1d2b929415538a0fa7 to your computer and use it in GitHub Desktop.
Save plowsof/3bfc30068a254e1d2b929415538a0fa7 to your computer and use it in GitHub Desktop.
user chillbruh requests starting monerod - exiting when synced
#!/bin/bash
monerod --detach
while [[ "$status" != "true" ]]; do
REQ=$(curl "http://localhost:18081/json_rpc" -d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' -H 'Content-Type: application/json')
status=$(echo $REQ | jq '.result.synchronized')
sleep 120
done
monerod exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment