Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- source /root/config
- speed=$(/usr/bin/speedtest-cli --csv)
- ping=$(echo ${speed} | cut -d ',' -f 6 | cut -d '.' -f 1)
- down=$(echo ${speed} | cut -d ',' -f 7 | cut -d '.' -f 1)
- up=$(echo ${speed} | cut -d ',' -f 8 | cut -d '.' -f 1)
- request="INSERT INTO stats.speed VALUES (NULL, CURRENT_TIMESTAMP, '$apteka', '$ping', '$up', '$down');"
- echo $request | /usr/bin/ssh -p ${sshport} pi@${host} /usr/bin/mysql -upi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement