dotfiles/.local/bin/check-kimsufi

15 lines
590 B
Text
Raw Permalink Normal View History

2019-06-13 20:12:29 +02:00
#!/bin/bash
id=${1:-1801sk13}
name=${2:-KS-2}
found=false
while ! $found
do
sleep 10
curl "https://www.ovh.com/engine/api/dedicated/server/availabilities?country=fr&hardware=${id}" 2>/dev/null | jq | grep -v '"availability": "unavailable"' | grep '"availability"' && found=true
done
notify-send -u critical "Kimsufi" "${name} disponible!"