mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2024-06-29 12:41:00 +02:00
Merge pull request #836 from mdzw/patch-1
Move gravity on boot to a @reboot cron job
This commit is contained in:
commit
1207b5cb88
|
@ -15,9 +15,10 @@ if [ -n "$PYTEST" ]; then
|
||||||
sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)"
|
sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)"
|
||||||
fi
|
fi
|
||||||
if [ -z "$SKIPGRAVITYONBOOT" ]; then
|
if [ -z "$SKIPGRAVITYONBOOT" ]; then
|
||||||
gravity.sh
|
echo '@reboot root PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updateGravity >/var/log/pihole_updateGravity.log || cat /var/log/pihole_updateGravity.log' > /etc/cron.d/gravity-on-boot
|
||||||
else
|
else
|
||||||
echo " Skipping Gravity Database Update."
|
echo " Skipping Gravity Database Update."
|
||||||
|
[ ! -e /etc/cron.d/gravity-on-boot ] || rm /etc/cron.d/gravity-on-boot &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Kill dnsmasq because s6 won't like it if it's running when s6 services start
|
# Kill dnsmasq because s6 won't like it if it's running when s6 services start
|
||||||
|
|
Loading…
Reference in New Issue
Block a user