1
0
mirror of https://github.com/pi-hole/docker-pi-hole.git synced 2024-07-06 16:10:53 +02:00
docker-pi-hole/s6/debian-root
Matt Winter fa771f74fd Change gravity-on-boot so it's run by cron
Proposed solution to #834

I believe the correct way to solve this issue is to change when "Gravity on Boot" is run.

The s6 init system has different stages. Currently, "gravity on boot" is run during Stage 2.ii: cont-init.d. One instance of pihole-FTL is started during cont-init, but it is only there to check the validity of the config files; it exits soon after starting. The final "service mode" instance of pihole-FTL is not started until Stage 2.iii, when the supervisor starts doing work.

If gravity.sh is counting on FTL to do its DNS lookups, then we should not run gravity until the supervised instance of FTL is running. We can accomplish this by moving "Gravity on Boot" to a @reboot line in /etc/cron.d/gravity-on-boot, and making that file's existence dependent on the value of SKIPGRAVITYONBOOT.

This will work because cron isn't started until we've reached Stage 2.iii.

Signed-off-by: Matt Winter <MattWinter@gmail.com>
2021-04-16 10:58:14 -04:00
..
etc Change gravity-on-boot so it's run by cron 2021-04-16 10:58:14 -04:00
usr/bin debian converted to s6, aline files moved 2017-05-05 21:48:03 -05:00