diff --git a/scripts/check-uninsane b/scripts/check-uninsane index d3a8ad9e..4bda812c 100755 --- a/scripts/check-uninsane +++ b/scripts/check-uninsane @@ -55,7 +55,17 @@ check "servo-hn wireguard network" ping -c 1 -W 3 servo-hn check "git.uninsane.org" git ls-remote origin --quiet -check "ftp://uninsane.org" lftpget ftp://uninsane.org/README.md && rm README.md +lftpgetIntoTmp() { + local url="$1" + local localName="$2" + ( + # run these commands in a subshell to preserve the old PWD + pushd /tmp + rm -f "$localName" + lftpget "$url" + ) +} +check "ftp://uninsane.org" lftpgetIntoTmp ftp://uninsane.org/README.md README.md echo "" echo "systemctl --failed:"