Primeiramente, vamos verificar se o python está disponível no repositório.
[2.4.5-RELEASE][root@pfsense]/root: pkg search python python27-2.7.18 Interpreted object-oriented programming language python37-3.7.7 Interpreted object-oriented programming language
Em seguida, vamos instalá-lo.
[2.4.5-RELEASE][root@pfsense]/root: pkg install python37 Updating pfSense-core repository catalogue... pfSense-core repository is up to date. Updating pfSense repository catalogue... pfSense repository is up to date. All repositories are up to date. Checking integrity… done (0 conflicting) The most recent version of packages are already installed
Aqui, podemos ver que o pacote já estava instalado. Então, basta baixar o speedtest-cli dos repositórios oficiais. Siga os passos a seguir.
[2.4.5-RELEASE][root@pfsense]/root: mkdir /root/temp [2.4.5-RELEASE][root@pfsense]/root: cd /root/temp [2.4.5-RELEASE][root@pfsense]/root/temp: fetch https://github.com/sivel/speedtest-cli/archive/master.zip [2.4.5-RELEASE][root@pfsense]/root/temp: unzip master.zip [2.4.5-RELEASE][root@pfsense]/root/temp: cd speedtest-cli-master/ [2.4.5-RELEASE][root@pfsense]/root/temp/speedtest-cli-master: chmod 755 speedtest.py [2.4.5-RELEASE][root@pfsense]/root/temp/speedtest-cli-master: mv speedtest.py /bin/speedtest-cli
Agora precisamos realizar um ajuste no script e para isso, precisamos descobrir qual é o executável do python. Digite na console:
[2.4.5-RELEASE][root@pfsense]/root: python<tab><tab> python2.7 python2.7-config python3.7 python3.7-config python3.7m python3.7m-config
Agora, vamos editar o arquivo /bin/speedtest-cli e alterar a primeira linha para que o nosso script funcione corretamente.
[2.4.5-RELEASE][root@pfsense]/root: vi /bin/speedtest-cli Linha original: #!/usr/bin/env python Linha customizada: #!/usr/bin/env python3.7
Para finalizar, realize o teste de velocidade.
[2.4.5-RELEASE][root@pfsense]/root: speedtest-cli
Caso queira especificar uma origem diferente, use:
[2.4.5-RELEASE][root@pfsense]/root: speedtest-cli --source 192.168.25.254
Caso a versão do seu pfSense seja a 2.4.3, é necessário ajustar um detalhe de biblioteca.
[2.4.3-RELEASE][root@pfsense]/root: ln -sf /lib/libc.so.7 /usr/lib/libdl.so.1
Boa tarde,
Uso a versão 2.5.2-RELEASE (amd64), segui o passo a passo desta página, e não funcionou.
Ao executar o teste aparece: “speedtest-cli: Command not found.”.
Poderia dizer o que pode estar errado?
At.te.,
Fabrizio.
Nao funcionou