Files
nas-scripts/check_buyvm_slice_available.sh

11 lines
266 B
Bash
Executable File

#!/bin/bash
URL="https://my.frantech.ca/cart.php?gid=39"
N=$(curl -s "$URL" \
| pup '#product1 > div:nth-child(4) > div:nth-child(2)' \
| grep -o '[0-9]\+')
if [ "$N" -gt 0 ]; then
curl -n -d "KVM slices available: $N" https://ntfy.franpenedo.com/general
fi