grab_uptime.sh 760 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. redishost="ramqtt"
  3. upyggdrasil="Yggdrasil:$(redis-cli -h ${redishost} get uptime/yggdrasil.lan |tr -d '"')min"
  4. upvingolf="Vingolf:$(redis-cli -h ${redishost} get uptime/vingolf.lan |tr -d '"')min"
  5. upodin="Odin:$(redis-cli -h ${redishost} get uptime/odin.lan |tr -d '"')min"
  6. #upyggdrasil=$(redis-cli -h ${redishost} get uptime/yggdrasil.lan |tr -d '"')
  7. #upvingolf=$(redis-cli -h ${redishost} get uptime/vingolf.lan |tr -d '"')
  8. #upodin=$(redis-cli -h ${redishost} get uptime/odin.lan |tr -d '"')
  9. echo ${upyggdrasil}
  10. echo ${upvingolf}
  11. echo ${upodin}
  12. convert -pointsize 30 -fill black -draw 'text 20 40 '\"${upyggdrasil}\"'' -draw 'text 20 80 '\"${upvingolf}\"'' -draw 'text 20 120 '\"${upodin}\"'' -size 240x240 xc: /tmp/weather/uptime.png