summaryrefslogtreecommitdiff
path: root/sh/upd
diff options
context:
space:
mode:
Diffstat (limited to 'sh/upd')
-rwxr-xr-xsh/upd12
1 files changed, 6 insertions, 6 deletions
diff --git a/sh/upd b/sh/upd
index eeecdf6..f8a315d 100755
--- a/sh/upd
+++ b/sh/upd
@@ -258,13 +258,13 @@ monthly_misc () {
fi
# https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)
- curl -s -X POST '10.0.0.4:57151/api/v2/search/updatePlugins' &
+ curl -sS -X POST '10.0.0.4:57151/api/v2/search/updatePlugins' &
for qbt_wireguard_ip in 10.0.0.3 10.0.0.4; do
- curl -s https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt | awk '$0{printf("%s\\n",$0)}' | xargs -0 -I {} curl -s -d json='{"add_trackers":"{}"}' "$qbt_wireguard_ip:57151/api/v2/app/setPreferences" &
+ curl -sS https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt | awk '$0{printf("%s\\n",$0)}' | xargs -0 -I {} curl -sS -d json='{"add_trackers":"{}"}' "$qbt_wireguard_ip:57151/api/v2/app/setPreferences" &
# another way: `jq -r '.[]|"\(.added_on)\t\(.hash)\t\(.name)"'`
- curl -s "$qbt_wireguard_ip: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
+ curl -sS "$qbt_wireguard_ip: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 -s -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_ip:57151/api/v2/torrents/delete"
+ curl -sS -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_ip:57151/api/v2/torrents/delete"
done &
done
wait
@@ -278,14 +278,14 @@ monthly_misc () {
rsync -vPu studio:~/downloads/torrents/useful/archlinux*.iso /run/media/xyz/Ventoy/archlinux-x86_64.iso
# only check checksum and gpg signature on insp is sufficient for me, else too much work
- if curl -s -o /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig https://mirror.fcix.net/archlinux/iso/latest/archlinux-x86_64.iso.sig; then
+ if curl -sS -o /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig https://mirror.fcix.net/archlinux/iso/latest/archlinux-x86_64.iso.sig; then
gpg --verify /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig || die 'Arch iso gpg signature check failed'
else
die 'Arch iso gpg signature download failed'
fi
# need to cd to iso file dir to checksum
cd /run/media/xyz/Ventoy || exit
- curl -s https://mirror.fcix.net/archlinux/iso/latest/sha256sums.txt | grep archlinux-x86_64\.iso | tee /run/media/xyz/Ventoy/archlinux-x86_64.iso.sha256 | sha256sum -c || die 'Arch iso checksum does not match'
+ curl -sS https://mirror.fcix.net/archlinux/iso/latest/sha256sums.txt | grep archlinux-x86_64\.iso | tee /run/media/xyz/Ventoy/archlinux-x86_64.iso.sha256 | sha256sum -c || die 'Arch iso checksum does not match'
# if stay at /run/media/xyz/Ventoy, will cause it be busy and can't be umount, which will cause `ventoy -u` fail
# need to be after `wait`, because checksum need to be at ventoy dir
cd || exit