-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 4.1 #370
Version 4.1 #370
Changes from all commits
7515c10
cb87448
e995ed2
d25aefb
3870154
b931633
88229a5
e87b2ff
0c2ba8f
88bec87
bceef5e
a47f278
10c44c9
61f701b
c45bf4c
d2651d8
d7a125a
62c1fb4
b39a2ad
b3beb91
e8b23bc
93bc8e3
1d379d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
#!/bin/bash -ex | ||
#!/bin/bash -ex / | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wait where did this / come from....... |
||
|
||
mkdir -p /etc/pihole/ | ||
mkdir -p /var/run/pihole | ||
# Production tags with valid web footers | ||
export CORE_TAG='v4.0' | ||
export WEB_TAG='v4.0' | ||
export CORE_TAG='v4.1' | ||
export WEB_TAG='v4.1' | ||
# Only use for pre-production / testing | ||
export USE_CUSTOM_BRANCHES=false | ||
|
||
apt-get update | ||
apt-get install -y curl procps | ||
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / | ||
mv /init /s6-init | ||
|
||
if [[ $USE_CUSTOM_BRANCHES == true ]] ; then | ||
CORE_TAG='development' | ||
CORE_TAG='release/v4.1' | ||
fi | ||
|
||
# Make pihole scripts fail searching for `systemctl`, | ||
# which fails pretty miserably in docker compared to `service` | ||
# For more info see docker/docker issue #7459 | ||
which systemctl && mv "$(which systemctl)" /bin/no_systemctl | ||
# debconf-apt-progress seems to hang so get rid of it too | ||
which debconf-apt-progress && mv "$(which debconf-apt-progress)" /bin/no_debconf-apt-progress | ||
which debconf-apt-progress | ||
mv "$(which debconf-apt-progress)" /bin/no_debconf-apt-progress | ||
|
||
# Get the install functions | ||
curl https://raw.githubusercontent.com/pi-hole/pi-hole/${CORE_TAG}/automated%20install/basic-install.sh > "$PIHOLE_INSTALL" | ||
|
@@ -40,7 +43,8 @@ export USER=pihole | |
distro_check | ||
|
||
# fix permission denied to resolvconf post-inst /etc/resolv.conf moby/moby issue #1297 | ||
apt-get -y install debconf-utils && echo resolvconf resolvconf/linkify-resolvconf boolean false | debconf-set-selections | ||
apt-get -y install debconf-utils | ||
echo resolvconf resolvconf/linkify-resolvconf boolean false | debconf-set-selections | ||
|
||
# Tried this - unattended causes starting services during a build, should probably PR a flag to shut that off and switch to that | ||
#bash -ex "./${PIHOLE_INSTALL}" --unattended | ||
|
@@ -63,10 +67,12 @@ mv "${tmpLog}" / | |
|
||
if [[ $USE_CUSTOM_BRANCHES == true ]] ; then | ||
ln -s /bin/true /usr/local/bin/service | ||
echo "$CORE_TAG" | tee /etc/pihole/ftlbranch | ||
ln -s /bin/true /usr/local/bin/update-rc.d | ||
echo y | bash -x pihole checkout core $CORE_TAG | ||
echo y | bash -x pihole checkout web $CORE_TAG | ||
echo y | bash -x pihole checkout ftl ${CORE_TAG/v/} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New way to checkout dev copies of FTL added as I was pre-release testing. Noticed no 'v' was in this tag where as the others weren't so I'm search/replacing it in this bash variable. |
||
unlink /usr/local/bin/service | ||
unlink /usr/local/bin/update-rc.d | ||
else | ||
# Reset to our tags so version numbers get detected correctly | ||
pushd "${PI_HOLE_LOCAL_REPO}"; git reset --hard "${CORE_TAG}"; popd; | ||
|
@@ -82,5 +88,5 @@ sed -i $'s/updatePiholeFunc;;/unsupportedFunc;;/g' /usr/local/bin/pihole | |
touch /.piholeFirstBoot | ||
|
||
# Fix dnsmasq in docker | ||
grep -q '^user=root' || echo -e '\nuser=root' >> /etc/dnsmasq.conf | ||
#grep -q '^user=root' || echo -e '\nuser=root' >> /etc/dnsmasq.conf | ||
echo 'Docker install successful' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
docker-compose | ||
jinja2 | ||
pytest | ||
pytest>=3.6.0 | ||
pytest-cov | ||
pytest-xdist | ||
testinfra==1.5.1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ fi | |
# used to start dnsmasq here for gravity to use...now that conflicts port 53 | ||
|
||
$bashCmd /start.sh | ||
# Gotta go fast, no time for gravity | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe not required, added before I added |
||
if [ -n "$PYTEST" ]; then | ||
sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)" | ||
fi | ||
gravity.sh | ||
|
||
# Kill dnsmasq because s6 won't like it if it's running when s6 services start | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pi-hole/api-approvers FYI no-daemon wasn't staying in the foreground for me in my hasty update last night, so I changed it to debug as a workaround to get things running (s6-service requires a foregrounded process)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I found the issue: pi-hole/FTL#430
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried to run it as
pihole-FTL no-daemon
and - as @Mcat12 commented in his PR - observed that Ctrl+C, etc. are not caught anymore, however,pihole-FTL
indeed stays in foreground and works as expected. We should continue this here: pi-hole/FTL#432