dotfiles/.local/bin/check-kimsufi
2019-06-13 20:12:29 +02:00

14 lines
590 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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!"