Merge pull request #52 from diginc/2_issue_fixes

Fix issues 50 and 51
This commit is contained in:
Adam Hill 2016-10-05 21:57:15 -05:00 committed by GitHub
commit 966715ac4d
5 changed files with 44 additions and 20 deletions

@ -1 +1 @@
Subproject commit 2f4bdc6d8204f215dea06937df54569b01b0f83e
Subproject commit f112893fee8496893687b460c85fefc1dfb88eac

View File

@ -1 +1 @@
v1.4.1
v1.4.2

View File

@ -6,15 +6,23 @@ fi;
# /tmp/piholeIP is the current override of auto-lookup in gravity.sh
echo "$ServerIP" > /etc/pihole/piholeIP;
echo "[www]" > $PHP_ENV_CONFIG;
echo "env[PATH] = ${PATH}" >> $PHP_ENV_CONFIG;
echo "env[PHP_ERROR_LOG] = ${PHP_ERROR_LOG}" >> $PHP_ENV_CONFIG;
echo "env[ServerIP] = ${ServerIP}" >> $PHP_ENV_CONFIG;
echo "ipv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "piholeIPv6=$ServerIPv6" >> /etc/pihole/setupVars.conf;
if [ -n "$VIRTUAL_HOST" ] ; then
echo "env[VIRTUAL_HOST] = ${VIRTUAL_HOST}" >> $PHP_ENV_CONFIG;
if [ ! -f /var/run/dockerpihole-firstboot ] ; then
echo "[www]" > $PHP_ENV_CONFIG;
echo "env[PATH] = ${PATH}" >> $PHP_ENV_CONFIG;
echo "env[PHP_ERROR_LOG] = ${PHP_ERROR_LOG}" >> $PHP_ENV_CONFIG;
echo "env[ServerIP] = ${ServerIP}" >> $PHP_ENV_CONFIG;
if [ -z "$VIRTUAL_HOST" ] ; then
VIRTUAL_HOST="$ServerIP"
fi;
echo "env[VIRTUAL_HOST] = ${VIRTUAL_HOST}" >> $PHP_ENV_CONFIG;
touch /var/run/dockerpihole-firstboot
else
echo "env[VIRTUAL_HOST] = ${ServerIP}" >> $PHP_ENV_CONFIG;
echo "Skipped first boot configuration, looks like you're restarting this container"
fi;
echo "Added ENV to php:"

View File

@ -6,13 +6,21 @@ fi;
# /tmp/piholeIP is the current override of auto-lookup in gravity.sh
echo "$ServerIP" > /etc/pihole/piholeIP;
sed -i "/bin-environment/ a\\\t\t\t\"ServerIP\" => \"${ServerIP}\"," $PHP_ENV_CONFIG
sed -i "/bin-environment/ a\\\t\t\t\"PHP_ERROR_LOG\" => \"${PHP_ERROR_LOG}\"," $PHP_ENV_CONFIG
echo "ipv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "piholeIPv6=$ServerIPv6" >> /etc/pihole/setupVars.conf;
if [ -n "$VIRTUAL_HOST" ] ; then
sed -i "/bin-environment/ a\\\t\t\t\"VIRTUAL_HOST\" => \"${VIRTUAL_HOST}\"," $PHP_ENV_CONFIG
else
sed -i "/bin-environment/ a\\\t\t\t\"VIRTUAL_HOST\" => \"${ServerIP}\"," $PHP_ENV_CONFIG
if [ ! -f /var/run/dockerpihole-firstboot ] ; then
sed -i "/bin-environment/ a\\\t\t\t\"ServerIP\" => \"${ServerIP}\"," $PHP_ENV_CONFIG
sed -i "/bin-environment/ a\\\t\t\t\"PHP_ERROR_LOG\" => \"${PHP_ERROR_LOG}\"," $PHP_ENV_CONFIG
if [ -z "$VIRTUAL_HOST" ] ; then
VIRTUAL_HOST="$ServerIP"
fi;
sed -i "/bin-environment/ a\\\t\t\t\"VIRTUAL_HOST\" => \"${VIRTUAL_HOST}\"," $PHP_ENV_CONFIG
touch /var/run/dockerpihole-firstboot
else
echo "Skipped first boot configuration, looks like you're restarting this container"
fi;
echo "Added ENV to php:"

18
debian/start.sh vendored
View File

@ -6,13 +6,21 @@ fi;
# /tmp/piholeIP is the current override of auto-lookup in gravity.sh
echo "$ServerIP" > /etc/pihole/piholeIP;
sed -i "/bin-environment/ a\\\t\t\t\"ServerIP\" => \"${ServerIP}\"," $PHP_ENV_CONFIG
sed -i "/bin-environment/ a\\\t\t\t\"PHP_ERROR_LOG\" => \"${PHP_ERROR_LOG}\"," $PHP_ENV_CONFIG
echo "ipv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "piholeIPv6=$ServerIPv6" >> /etc/pihole/setupVars.conf;
if [ -n "$VIRTUAL_HOST" ] ; then
sed -i "/bin-environment/ a\\\t\t\t\"VIRTUAL_HOST\" => \"${VIRTUAL_HOST}\"," $PHP_ENV_CONFIG
if [ ! -f /var/run/dockerpihole-firstboot ] ; then
sed -i "/bin-environment/ a\\\t\t\t\"ServerIP\" => \"${ServerIP}\"," $PHP_ENV_CONFIG
sed -i "/bin-environment/ a\\\t\t\t\"PHP_ERROR_LOG\" => \"${PHP_ERROR_LOG}\"," $PHP_ENV_CONFIG
if [ -z "$VIRTUAL_HOST" ] ; then
VIRTUAL_HOST="$ServerIP"
fi;
sed -i "/bin-environment/ a\\\t\t\t\"VIRTUAL_HOST\" => \"${VIRTUAL_HOST}\"," $PHP_ENV_CONFIG
touch /var/run/dockerpihole-firstboot
else
sed -i "/bin-environment/ a\\\t\t\t\"VIRTUAL_HOST\" => \"${ServerIP}\"," $PHP_ENV_CONFIG
echo "Skipped first boot configuration, looks like you're restarting this container"
fi;
echo "Added ENV to php:"