Version in the web interfaces works now! (various)

* Added version files, updated by the submodule updater script
* Modify the php of adminLTE to read said version files
* Fixed env in the dockerfiles
This commit is contained in:
diginc 2016-03-29 19:51:08 -05:00
parent e9412e7190
commit eeb7b84f5a
7 changed files with 20 additions and 8 deletions

1
AdminLTE_version.txt Normal file
View File

@ -0,0 +1 @@
v1.1.4

View File

@ -19,6 +19,8 @@ COPY ./pi-hole/advanced/Scripts/* /usr/local/bin/
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.conf
COPY ./pi-hole/advanced/index.html /var/www/html/pihole/index.html
COPY ./AdminLTE /var/www/html/admin
COPY ./AdminLTE_version.txt /etc/
COPY ./pi-hole_version.txt /etc/
# Things installer did
RUN mkdir -p /etc/pihole/ && \
@ -31,7 +33,9 @@ RUN mkdir -p /etc/pihole/ && \
chown dnsmasq:root /var/log/pihole.log && \
sed -i "s/@INT@/eth0/" /etc/dnsmasq.conf && \
sed -i "s/@DNS1@/8.8.8.8/" /etc/dnsmasq.conf && \
sed -i "s/@DNS2@/8.8.4.4/" /etc/dnsmasq.conf
sed -i "s/@DNS2@/8.8.4.4/" /etc/dnsmasq.conf && \
sed -i 's|"cd /etc/.pihole/ && git describe --tags --abbrev=0"|"cat /etc/pi-hole_version.txt"|g' /var/www/html/admin/footer.php && \
sed -i 's|"cd /var/www/html/admin/ && git describe --tags --abbrev=0"|"cat /etc/AdminLTE_version.txt"|g' /var/www/html/admin/footer.php
# This chould be eliminated if the (upstream) files were +x in git
RUN chmod +x /usr/local/bin/*.sh

View File

@ -25,6 +25,8 @@ COPY ./pi-hole/advanced/lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.conf
COPY ./pi-hole/advanced/index.html /var/www/html/pihole/index.html
COPY ./AdminLTE /var/www/html/admin
COPY ./AdminLTE_version.txt /etc/
COPY ./pi-hole_version.txt /etc/
RUN mkdir -p /etc/pihole/ && \
mkdir -p /var/www/html/pihole && \
@ -37,7 +39,9 @@ RUN mkdir -p /etc/pihole/ && \
chown dnsmasq:root /var/log/pihole.log && \
sed -i "s/@INT@/eth0/" /etc/dnsmasq.conf && \
sed -i "s/@DNS1@/8.8.8.8/" /etc/dnsmasq.conf && \
sed -i "s/@DNS2@/8.8.4.4/" /etc/dnsmasq.conf
sed -i "s/@DNS2@/8.8.4.4/" /etc/dnsmasq.conf && \
sed -i 's|"cd /etc/.pihole/ && git describe --tags --abbrev=0"|"cat /etc/pi-hole_version.txt"|g' /var/www/html/admin/footer.php && \
sed -i 's|"cd /var/www/html/admin/ && git describe --tags --abbrev=0"|"cat /etc/AdminLTE_version.txt"|g' /var/www/html/admin/footer.php
# This chould be eliminated if the files were +x in git
RUN chmod +x /usr/local/bin/*.sh

View File

@ -2,8 +2,8 @@ alpine:
build: .
dockerfile: alpine.docker
environment:
# Your docker host IP is required
- piholeIP: 192.168.1.55
# Your docker host IP is required if you run RUN (not build)
piholeIP: 192.168.1.55
ports:
- "53:53/tcp"
- "53:53/udp"

View File

@ -2,8 +2,8 @@ debian:
build: .
dockerfile: debian.docker
environment:
# Your docker host IP is required
- piholeIP: 192.168.1.55
# Your docker host IP is required if you run RUN (not build)
piholeIP: 192.168.1.55
ports:
- "53:53/tcp"
- "53:53/udp"

1
pi-hole_version.txt Normal file
View File

@ -0,0 +1 @@
v2.5.3

View File

@ -1,5 +1,7 @@
#!/bin/bash
git submodule foreach git pull origin master
cp pi-hole/gravity.sh alpine/
git submodule foreach git pull origin master;
cp pi-hole/gravity.sh alpine/;
sed -i '/^gravity_reload/ c\#gravity_reload' alpine/gravity.sh
pushd pi-hole ; git describe --tags --abbrev=0 > ../pi-hole_version.txt ; popd ;
pushd AdminLTE ; git describe --tags --abbrev=0 > ../AdminLTE_version.txt ; popd ;