shrink 20-start.sh, merge to start.sh

This commit is contained in:
diginc 2018-01-03 22:34:31 -06:00
parent c4986cfeff
commit c4dc16685a
3 changed files with 6 additions and 25 deletions

View File

@ -91,6 +91,7 @@ setup_dnsmasq() {
setup_dnsmasq_dns "$DNS1" "$DNS2"
setup_dnsmasq_interface "$INTERFACE"
ProcessDNSSettings
dnsmasq -7 /etc/dnsmasq.d --interface="${INTERFACE:-eth0}"
}
setup_dnsmasq_hostnames() {
@ -242,18 +243,3 @@ test_framework_stubbing() {
echo 'http://localhost/fake.list' >> /etc/pihole/adlists.list
fi
}
docker_main() {
echo -n '::: Starting up DNS and Webserver ...'
service dnsmasq restart # Just get DNS up. The webserver is down!!!
TAG="$1"
case $TAG in # Setup webserver
"debian")
service lighttpd start
;;
esac
gravity.sh # Finally lets update and be awesome.
tail -F "${WEBLOGDIR}"/*.log /var/log/pihole.log
}

View File

@ -4,14 +4,7 @@ set -e
bashCmd='bash -e'
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
bashCmd='bash -ex'
bashCmd='bash -e -x'
fi
# Early DNS Startup for the gravity list process to use
dnsmasq -7 /etc/dnsmasq.d
$bashCmd /start.sh
$bashCmd gravity.sh
# Done with DNS, let s6 services start up properly configured dns now
killall -9 dnsmasq

View File

@ -31,8 +31,10 @@ setup_ipv4_ipv6
setup_lighttpd_bind "$ServerIP" "$TAG"
test_configs
test_framework_stubbing
echo "::: Docker start setup complete - beginning s6 services"
[ -f /.piholeFirstBoot ] && rm /.piholeFirstBoot
# s6's init takes care of running services now, no more main start services function
gravity.sh
killall -9 dnsmasq
echo "::: Docker start setup complete - beginning s6 services"