diff options
Diffstat (limited to 'sh')
-rwxr-xr-x | sh/upd | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -304,14 +304,12 @@ monthly_misc () { # https://github.com/qbittorrent/qBittorrent/wiki#webui-api curl -sS -X POST 'ibwg:57151/api/v2/search/updatePlugins' & - # in the past, I have both stwg and ibwg, now only one but I decided to keep the code - for qbt_wireguard_host in ibwg; do - # another way: `jq -r '.[]|"\(.added_on)\t\(.hash)\t\(.name)"'` - curl -sS "$qbt_wireguard_host:57151/api/v2/torrents/info?category=useful" | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do - # need POST to delete torrents. -d default POST, so no need `-X POST` - curl -sS -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_host:57151/api/v2/torrents/delete" - done & - done + # in the past, I have both stwg and ibwg, now only one + # another way: `jq -r '.[]|"\(.added_on)\t\(.hash)\t\(.name)"'` + curl -sS 'ibwg:57151/api/v2/torrents/info?category=useful' | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do + # need POST to delete torrents. -d default POST, so no need `-X POST` + curl -sS -d "hashes=$hash" -d deleteFiles=true 'ibwg:57151/api/v2/torrents/delete' + done & wait while ! [ -d /run/media/xyz/Ventoy ]; do |