mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Debian buildpack image for docker (Need curl
for testing, using scm version to add curl
and git
.)
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
87edbeaf58
commit
7a269e757e
2 changed files with 7 additions and 7 deletions
|
@ -1155,18 +1155,18 @@ if [[ "${reconfigure}" == true ]]; then
|
||||||
FTLinstall() {
|
FTLinstall() {
|
||||||
# Download and Install FTL binary
|
# Download and Install FTL binary
|
||||||
local binary="${1}"
|
local binary="${1}"
|
||||||
local latesttag
|
local latestURL
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo -n "::: Installing FTL ... "
|
echo -n "::: Installing FTL ... "
|
||||||
|
|
||||||
latesttag=$(curl -s https://api.github.com/repos/pi-hole/FTL/releases/latest | grep "tag_name" | sed "s/.*: \"//;s/\",//;")
|
latestURL=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk '{print $2}')
|
||||||
if [ ! "${latesttag}" ]; then
|
if [ ! "${latestURL}" ]; then
|
||||||
echo "::: failed (error in getting latest release tag from GitHub)"
|
echo "::: failed (error in getting latest release location from GitHub)"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if curl -sSL --fail "https://github.com/pi-hole/FTL/releases/download/${latesttag}/${binary}" -o "/opt/pihole/pihole-FTL"; then
|
if curl -sSL --fail "${latestURL}${binary}" -o "/tmp/pihole-FTL"; then
|
||||||
echo "::: done"
|
echo "::: done"
|
||||||
install -m 0755 /opt/pihole/pihole-FTL /usr/bin
|
install -m 0755 /tmp/pihole-FTL /usr/bin
|
||||||
touch /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port
|
touch /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port
|
||||||
chmod 0666 /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port
|
chmod 0666 /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM debian:jessie
|
FROM buildpack-deps:jessie-scm
|
||||||
|
|
||||||
ENV GITDIR /etc/.pihole
|
ENV GITDIR /etc/.pihole
|
||||||
ENV SCRIPTDIR /opt/pihole
|
ENV SCRIPTDIR /opt/pihole
|
||||||
|
|
Loading…
Reference in a new issue