Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Speedtest for firewalla
#!/bin/bash
installcheck=$(which speedtest)
echo $installcheck
if [ -n "$installcheck" ] ; then
echo -e "\n\nspeedcheck instaleld!\n bye"
exit
fi
list=$(/etc/apt/sources.list.d/speedtest.list)
if [ -n "$list" ] ; then
echo -e "\n\nspeedcheck instaleld!\n bye"
sudo rm /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
sudo apt-get remove speedtest
fi
sudo apt-get update
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
sudo apt-get install speedtest
@mbierman

This comment has been minimized.

Copy link
Owner Author

@mbierman mbierman commented Mar 27, 2021

Want to have speedtest cli on Firewalla Gold? This will tell you how fast your internet connection is right on Firewalla (no wifi or Ethernet involved) see this for additional info on Firewalla installation.

see also this script if you want to run speedtest and log results.

Firewalla will remove anything installed after upgrades so you can install a script to reinstall for you after firewalla upgrades and possibly reboots.

Log in to firewalla with ssh. Then type:
cd ~/.firewalla/config/post_main.d/

if no directory is found

mkdir ~/.firewalla/config/post_main.d/
cd ~/.firewalla/config/post_main.d/

Then save this script and make it executable using vi or nano. For example
sudo vi install_speedtest.sh

Copy/Paste this script at https://gist.github.com/mbierman/9ac6a35622ee5a0c631ed6f6ad74b722 and save and close.

This should give you a file at ~/.firewalla/config/post_main.d/install_speedtest.sh

Then change permissions and run it.

sudo chmod a+x install_speedtest.sh
~/.firewalla/config/post_main.d/install_speedtest.sh

I adapted this to run on my Firewalla Gold because anything that gets installed may get wiped on reboot. So this checks if speedtest is installed and installs it if it isn’t found.

This will now run every time firewalla boots or upgrades. If speedtest isn’t found, it will be installed.

Then you can run speedtest.

speedtest --interface=eth0

Or

speedtest --interface=eth1

if you have dual WAN and want to test WAN2

See also this script which will log your speedtests to a Google Sheet, a log file, or both.

@cstrat

This comment has been minimized.

Copy link

@cstrat cstrat commented Mar 28, 2021

image

@cstrat

This comment has been minimized.

Copy link

@cstrat cstrat commented Mar 29, 2021

Thanks for this script, I just installed it. Exactly what I needed, just hope they build it into the firewalla interface at some point 👍

@mbierman

This comment has been minimized.

Copy link
Owner Author

@mbierman mbierman commented Mar 29, 2021

You’re welcome! Glad you found it useful.

@mbierman

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment