Last active
February 19, 2020 10:26
-
-
Save sparanoid-bot/4441239 to your computer and use it in GitHub Desktop.
Update Speedtest.net Mini automatically to avoid expiring.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NO LONGER MAINTAINED | |
# SEE https://gist.github.com/sparanoid/abb6e26d968accef9aa2 FOR UPDATE | |
DES_PATH=/usr/share | |
PUB_PATH=/srv/www/domain.tld/public_html | |
ST_DIR=speedtest | |
wget http://c.speedtest.net/mini/mini.zip -O $DES_PATH/$ST_DIR.zip --limit-rate=200000k | |
unzip -o $DES_PATH/$ST_DIR.zip -d $DES_PATH/$ST_DIR | |
# Remove old public files | |
rm -rf $PUB_PATH/$ST_DIR | |
# Link from private directory to public directory | |
ln -sf $DES_PATH/$ST_DIR/mini $PUB_PATH/$ST_DIR | |
# Rename index-php.html to index.php | |
mv $DES_PATH/$ST_DIR/mini/index-php.html $DES_PATH/$ST_DIR/mini/index.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With auto update check feature: https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/update-speedtest-mini.sh