From 2b33de5b6abf0216b5769553eb0e95ac30560036 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 14 Aug 2019 09:09:27 +0200 Subject: [PATCH] added script to fetch / filter Hetzners SB offers --- bash/hetzer_sb_notify.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bash/hetzer_sb_notify.sh diff --git a/bash/hetzer_sb_notify.sh b/bash/hetzer_sb_notify.sh new file mode 100755 index 0000000..9ef3feb --- /dev/null +++ b/bash/hetzer_sb_notify.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +FILTER=$(mktemp) + +cat > ${FILTER} <= 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