Merge pull request #672 from AthrogatePEQ/master

Ability to skip Gravity refresh on startup
This commit is contained in:
Adam Hill 2020-08-22 20:38:17 -05:00 committed by GitHub
commit 87132465b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -121,6 +121,7 @@ There are other environment variables if you want to customize various things in
| `DNSMASQ_USER: <pihole\|root>`<br/> *Experimental Default: root* | Allows running FTLDNS as non-root.
| `TEMPERATUREUNIT`: <c\|k\|f><br/>*Optional Default: c* | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units.
| `WEBUIBOXEDLAYOUT: <boxed\|traditional>`<br/>*Optional Default: boxed* | Use boxed layout (helpful when working on large screens)
| `SKIPGRAVITYONBOOT`: <Not Set\|1><br/> *Optional Default: Not Set* | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be updated when the container starts up. Setting this environment variable to 1 (or anything) will cause the Gravity Database to not be updated when container starts up.
To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1`

View File

@ -14,7 +14,11 @@ $bashCmd /start.sh
if [ -n "$PYTEST" ]; then
sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)"
fi
gravity.sh
if [ -z "$SKIPGRAVITYONBOOT" ]; then
gravity.sh
else
echo " Skipping Gravity Database Update."
fi
# Kill dnsmasq because s6 won't like it if it's running when s6 services start
kill -9 $(pgrep pihole-FTL) || true