forked from xmrig/xmrig
-
Notifications
You must be signed in to change notification settings - Fork 110
Useful scripts
Ben Gräf edited this page Dec 28, 2017
·
5 revisions
#!/bin/bash
baseUrl="http://admin:pass@localhost:3344"
command="UPDATE_CONFIG"
curl "$baseUrl/admin/getClientStatusList" --silent | awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/\042'client_id'\042/){print $(i+1)}}}' | tr -d '"' | sed -n ${num}p | while read -r line ; do
curl -H "Content-Type: application/json" -X POST -d '{"control_command":{"command":"'$command'"}}' "$baseUrl/admin/setClientCommand?clientId=$line"
done
#!/bin/bash
baseUrl="http://admin:pass@localhost:3344"
curl "$baseUrl/admin/getClientStatusList" --silent | awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/\042'client_id'\042/){print $(i+1)}}}' | tr -d '"' | sed -n ${num}p | while read -r line ; do
echo $line
done