Files
init-debian/add-speedtest.sh
T
2024-02-13 16:04:54 +08:00

14 lines
485 B
Bash

#!/usr/bin/env bash
set -e
main(){
echo "deb https://packagecloud.io/ookla/speedtest-cli/debian/ $OS_CODE main" | \
tee /etc/apt/sources.list.d/ookla_speedtest-cli.list
curl -fsSL "https://packagecloud.io/ookla/speedtest-cli/gpgkey" | \
gpg --dearmor | tee /etc/apt/trusted.gpg.d/ookla_speedtest-cli-archive-keyring.gpg > /dev/null
command="nala"
command -v $command &>/dev/null || command="apt"
$command update
$command install -y speedtest
}