Created
June 25, 2022 17:58
-
-
Save thosmos/c68a50747fd643e9ec2fc704797aebd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 [email protected] -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