added script to fetch / filter Hetzners SB offers
This commit is contained in:
parent
b2ba0cc1d4
commit
2b33de5b6a
1 changed files with 22 additions and 0 deletions
22
bash/hetzer_sb_notify.sh
Executable file
22
bash/hetzer_sb_notify.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
FILTER=$(mktemp)
|
||||
|
||||
cat > ${FILTER} <<EOF
|
||||
.server |
|
||||
map(
|
||||
select(
|
||||
.hdd_size >= 3000 and
|
||||
.ram >= 32 and
|
||||
.bandwith >= 1000 and
|
||||
.traffic == "unlimited" and
|
||||
.cpu_benchmark >= 9000 and
|
||||
(.setup_price | tonumber) == 0 and
|
||||
(.price | tonumber) <= 50 and
|
||||
(.specials | map(ascii_downcase ) | index("ssd"))
|
||||
)
|
||||
) |
|
||||
sort_by(.price | tonumber) | reverse
|
||||
EOF
|
||||
|
||||
curl https://www.hetzner.de/a_hz_serverboerse/live_data.json | jq -f $FILTER
|
Loading…
Add table
Reference in a new issue