2017-02-09 20:01:34 +01:00
|
|
|
#!/bin/bash -e
|
2016-10-07 02:46:20 +02:00
|
|
|
# Dockerfile variables
|
2017-10-04 18:05:27 +02:00
|
|
|
export TAG
|
2016-10-07 02:46:20 +02:00
|
|
|
export ServerIP
|
|
|
|
export ServerIPv6
|
|
|
|
export PYTEST
|
|
|
|
export PHP_ENV_CONFIG
|
|
|
|
export PHP_ERROR_LOG
|
2016-10-30 18:13:52 +01:00
|
|
|
export HOSTNAME
|
2016-11-06 20:41:14 +01:00
|
|
|
export WEBLOGDIR
|
2017-01-18 05:49:42 +01:00
|
|
|
export DNS1
|
|
|
|
export DNS2
|
2017-03-05 00:31:09 +01:00
|
|
|
export INTERFACE
|
2016-11-06 20:41:14 +01:00
|
|
|
export IPv6
|
|
|
|
|
2017-01-18 05:49:42 +01:00
|
|
|
. /bash_functions.sh
|
2016-10-07 02:46:20 +02:00
|
|
|
|
2017-01-18 05:49:42 +01:00
|
|
|
echo " ::: Starting docker specific setup for docker diginc/pi-hole"
|
2017-05-19 07:36:53 +02:00
|
|
|
validate_env || exit 1
|
2017-01-21 22:02:08 +01:00
|
|
|
prepare_setup_vars
|
2017-01-18 05:49:42 +01:00
|
|
|
change_setting "IPV4_ADDRESS" "$ServerIP"
|
|
|
|
change_setting "IPV6_ADDRESS" "$ServerIPv6"
|
2017-02-09 05:46:46 +01:00
|
|
|
setup_web_password "$WEBPASSWORD"
|
2017-09-03 08:57:52 +02:00
|
|
|
setup_dnsmasq "$DNS1" "$DNS2"
|
2017-01-18 05:49:42 +01:00
|
|
|
setup_php_env
|
2016-10-30 18:13:52 +01:00
|
|
|
setup_dnsmasq_hostnames "$ServerIP" "$ServerIPv6" "$HOSTNAME"
|
2016-10-21 05:36:55 +02:00
|
|
|
setup_ipv4_ipv6
|
2017-10-04 18:05:27 +02:00
|
|
|
setup_lighttpd_bind "$ServerIP" "$TAG"
|
2016-10-07 02:46:20 +02:00
|
|
|
test_configs
|
|
|
|
test_framework_stubbing
|
2017-05-14 00:03:24 +02:00
|
|
|
echo "::: Docker start setup complete - beginning s6 services"
|
2016-03-28 16:23:37 +02:00
|
|
|
|
2017-05-06 04:48:03 +02:00
|
|
|
# s6's init takes care of running services now, no more main start services function
|