Skip to content

Instantly share code, notes, and snippets.

@thosmos
Created June 25, 2022 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thosmos/c68a50747fd643e9ec2fc704797aebd1 to your computer and use it in GitHub Desktop.
Save thosmos/c68a50747fd643e9ec2fc704797aebd1 to your computer and use it in GitHub Desktop.
#!/bin/bash
START="2022-04-01"
END="2022-05-01"
IPS=(
"fdab:4482:93bf:548b:6f7b:df86:84ee:9847"
"fd58:6f40:8a64:c3a2:43f0:dad6:26f6:5c03"
)
for ip in "${IPS[@]}"; do
echo "IP: $ip"
ssh -J root@192.168.10.1 -l root -p 2200 $ip "grep nick /etc/rita.toml 1>&2; PASS=`grep dashboard_password /etc/rita.toml 2>/dev/null | tr -d '\"' | sed 's/rita_dashboard_password = //'`; curl -s -u rita:$PASS localhost:4877/usage/client " | START=$START END=$END node process-usage.js
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment