Skip to content

Commit

Permalink
Merge pull request #672 from AthrogatePEQ/master
Browse files Browse the repository at this point in the history
Ability to skip Gravity refresh on startup
  • Loading branch information
diginc authored Aug 23, 2020
2 parents 52e819a + 97d00cd commit 8713246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
6 changes: 5 additions & 1 deletion s6/debian-root/etc/cont-init.d/20-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8713246

Please sign in to comment.