From ed0ed562ca1ab6e064d8f2e4377776a43daf2577 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 11 Jul 2025 16:39:05 +0800 Subject: upd: remove some studio related --- sh/upd | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'sh') diff --git a/sh/upd b/sh/upd index 133716b..a1c87e0 100755 --- a/sh/upd +++ b/sh/upd @@ -14,9 +14,8 @@ all () { fi fast clean - # don't run reflector if it is pp or aa or {it is studio and insp is in the same network} - # somehow ping local hostname via ipv6 is very slow, so I use ipv4 to ping - if ! { [ "$hostname" = xyzpp ] || { [ "$hostname" = xyzstudio ] && ping -4qc1 xyzinsp > /dev/null;};}; then + # don't run reflector if it is pp or insp, because they all VPN to ba now + if ! { [ "$hostname" = xyzpp ] || [ "$hostname" = xyzinsp ] }; then refl fi monthly_misc @@ -124,7 +123,7 @@ clean () { fast () { pac misc - if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzstudio ] || [ "$hostname" = xyzpp ]; then + if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then backup fi } @@ -286,15 +285,12 @@ music () { monthly_misc () { if [ "$hostname" = xyzinsp ]; then - # if insp can ping studio, which means insp and studio is in the same network - if ping -4qc1 xyzstudio > /dev/null && scp /etc/pacman.d/mirrorlist studio:/tmp; then - echo 'Wait for studio sudo prompt and enter password:' - ssh -t studio 'sudo mv /tmp/mirrorlist /etc/pacman.d/mirrorlist && sudo chown root:root /etc/pacman.d/mirrorlist' - fi + sudo scp xyz@ba.flylightning.xyz:/etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist # https://github.com/qbittorrent/qBittorrent/wiki#webui-api curl -sS -X POST 'ibwg:57151/api/v2/search/updatePlugins' & - for qbt_wireguard_host in stwg ibwg; do + # 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` @@ -310,7 +306,7 @@ monthly_misc () { done #[ -d /run/media/xyz/Ventoy ] || die "No usb flash drive" - rsync -vPu studio:~/downloads/torrents/useful/archlinux*.iso /run/media/xyz/Ventoy/archlinux-x86_64.iso + rsync -vPu ib:~/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 -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' -- cgit v1.2.3-70-g09d2