diff --git a/README.md b/README.md index b449275..79a07a4 100644 --- a/README.md +++ b/README.md @@ -156,9 +156,9 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel   ## Application Setup -Access the speedtest webui at `http://`. -The results database can be accessed at `http:///results/stats.php`. -The default template used is based on `example-singleServer-full.html`. However, all templates are provided for reference at `/config/www/`. If you place a custom file at `/config/www/index.html`, the custom file will be served after a container restart. Delete the file and restart to go back to the default. +Access the speedtest webui at `http://`. The results database can be accessed at `http:///results/stats.php` with the password set. +The default template used is based on `example-singleServer-full.html`. However, all templates are provided for reference at `/config/www/`. Feel free to customize `/config/www/index.html` as you like. Delete the file and restart to go back to the image default. + You can optionally place customized `speedtest.js` and `speedtest_worker.js` files under `/config/www` and they will supersede the defaults after a container start. Keep in mind that once you do so, they will no longer be updated. You can delete them and recreate the container to go back to the image defaults. If you are setting up a mysql or postgresql database, you first need to import the tables into your database as described at the following link diff --git a/readme-vars.yml b/readme-vars.yml index 7ce462e..0ccd0dc 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -49,9 +49,9 @@ optional_block_1_items: "" # application setup block app_setup_block_enabled: true app_setup_block: | - Access the speedtest webui at `http://`. - The results database can be accessed at `http:///results/stats.php`. - The default template used is based on `example-singleServer-full.html`. However, all templates are provided for reference at `/config/www/`. If you place a custom file at `/config/www/index.html`, the custom file will be served after a container restart. Delete the file and restart to go back to the default. + Access the speedtest webui at `http://`. The results database can be accessed at `http:///results/stats.php` with the password set. + The default template used is based on `example-singleServer-full.html`. However, all templates are provided for reference at `/config/www/`. Feel free to customize `/config/www/index.html` as you like. Delete the file and restart to go back to the image default. + You can optionally place customized `speedtest.js` and `speedtest_worker.js` files under `/config/www` and they will supersede the defaults after a container start. Keep in mind that once you do so, they will no longer be updated. You can delete them and recreate the container to go back to the image defaults. If you are setting up a mysql or postgresql database, you first need to import the tables into your database as described at the following link diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 12be25b..f2bee41 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -4,12 +4,9 @@ mkdir -p \ /config/www -# create index.html -if [ -f /config/www/index.html ]; then - cp /config/www/index.html /usr/share/webapps/librespeed/index.html -else - cp /defaults/index.html /usr/share/webapps/librespeed/index.html -fi +# create symlink to index.html +[[ ! -L /usr/share/webapps/librespeed/index.html ]] && \ + ln -s /config/www/index.html /usr/share/webapps/librespeed/index.html # update templates cp /usr/share/webapps/librespeed/example*.html /config/www/