Commit graph

731 commits

Author SHA1 Message Date
DL6ER
90ccbef431
pihole-FTL init.d script 2017-02-21 11:18:47 +01:00
Dan Schaper
4cd598ae10
Check support files installed and permissions.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 18:12:51 -08:00
Dan Schaper
2ffb103acb
Move binary to final home.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 15:44:33 -08:00
Dan Schaper
a0c17368ed
cd to directory to sha1sum
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 15:27:24 -08:00
Dan Schaper
6023984703
Silence sha check
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 15:13:54 -08:00
Dan Schaper
cde7b53de3
Check sha1 of transferred file.
Sha1sum file in temp directory.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 15:13:26 -08:00
Dan Schaper
e087797edc
Test for format of tag version.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 11:49:20 -08:00
Dan Schaper
5e6f8489a9
Find 404 errors and relay message.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 11:45:58 -08:00
Dan Schaper
48351fed79
Remove trailing newline from curl'd variable.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 11:33:55 -08:00
Dan Schaper
875a5d309d
Check downloaded file for binary or text.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 11:28:36 -08:00
Dan Schaper
70e876ee13
Download tests.
Make sure we download a binary and not just get the GitHub page.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 11:11:16 -08:00
Dan Schaper
7a269e757e
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>
2017-02-20 09:24:47 -08:00
Dan Schaper
87edbeaf58
Factor out downloader from detector function.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 08:40:17 -08:00
Dan Schaper
339f95b00c
Change from uname -m to straight arch
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-02-20 08:13:46 -08:00
DL6ER
70a6a79b8c
Detect library differently 2017-02-20 13:40:32 +01:00
DL6ER
f24f77c5bd
Detect if architecture is *aarch* + use hf binary only if ARMv7+ is detected 2017-02-20 11:14:23 +01:00
DL6ER
378338c684
Install pihole-FTL to /usr/bin instead of /usr/local/bin 2017-02-20 10:42:07 +01:00
Adam Warner
36166c129a Merge pull request #1253 from Skittels0/even_more_dns
Adds DNS.WATCH to default dns servers
2017-02-18 19:12:32 +00:00
Skittels
4e7a485e23 Update basic-install.sh 2017-02-18 13:42:13 +01:00
Skittels
9e5795bf55 Added DNS.WATCH to default dns servers 2017-02-18 13:03:40 +01:00
DL6ER
4035c933df
Moved echo to else block 2017-02-13 16:50:48 +01:00
DL6ER
abd44dd284
Add 32bit message 2017-02-13 16:33:22 +01:00
DL6ER
95d7fe76b5
Make comments more pretty 2017-02-13 14:50:25 +01:00
DL6ER
a052f397fe
Be more verbose during install 2017-02-13 14:47:06 +01:00
DL6ER
09d6e73b0a
Don't print error message on 32bit platforms 2017-02-13 14:42:11 +01:00
DL6ER
7fb6b71d52
Fix install path 2017-02-13 14:40:31 +01:00
DL6ER
07e37d7fc3
Proper error handling 2017-02-13 11:33:09 +01:00
DL6ER
fbe3dc0dcd
Have to get latest tag via GitHub API for downloading the binaries 2017-02-13 11:27:52 +01:00
DL6ER
6018c0c2fc
Add FTLinstall() 2017-02-13 11:07:29 +01:00
DL6ER
52a2f166fd
Add FTLdownload() subroutine 2017-02-13 10:29:27 +01:00
Mcat12
ba67144e34 Merge branch 'development' into adminPageAsOption 2017-02-09 16:27:07 -05:00
Dan Schaper
34f326c559 Update basic-install.sh 2017-02-08 14:13:49 -08:00
DL6ER
8fb6ba19a1
Remove double echos 2017-02-06 12:06:38 +01:00
Dan Schaper
314f7e7889 Merge pull request #1183 from pi-hole/tweak/update_cache_trap
Trap for package cache update failures.
2017-02-05 16:04:19 -08:00
Promofaux
4fcf8fd23f Merge in development branch - resolve conflict in update.sh 2017-02-05 19:39:02 +00:00
Promofaux
1206dda347 testing putting runGravity at a different part of the script 2017-02-05 19:23:04 +00:00
Promofaux
e57425df5f 0.0.0.0 instead of pi-holes IP address for redirect purposes 2017-02-04 15:25:11 +00:00
Dan Schaper
b8d0e5e5a1 Merge pull request #1210 from pi-hole/fix/dhcpcd_int
Remove comment leaders from DHCPCD interface
2017-02-02 12:48:29 -08:00
Dan Schaper
26ad23f01e Remove comment leaders from DHCPCD interface
We need to set the interface in DHCPCD, comments were inadvertently added a while ago.
2017-02-01 18:33:42 -08:00
Mcat12
18eb8a2159 Merge pull request #1185 from pi-hole/cleanup/git_functions
Move git functions to one script
2017-01-31 19:05:53 -05:00
DL6ER
8b22f435ad
Change how user and group are stored in the logrotate config file (necessary on Ubuntu 16.04.1) 2017-01-29 19:58:53 +01:00
Dan Schaper
3861b57dc6
Start moving reused utility functions to one script. 2017-01-28 17:32:42 -08:00
Dan Schaper
7291aa07ca
Silenc cache updater. 2017-01-28 16:46:37 -08:00
Dan Schaper
409f76aa34
Error check. 2017-01-28 16:37:31 -08:00
Dan Schaper
a281d87315
Eval variable. (Not a fan.) 2017-01-28 16:37:26 -08:00
Dan Schaper
2d18b2d784
Start test templates. 2017-01-28 16:37:04 -08:00
Promofaux
c31b4383e6 add back in code to stop dnsmasq and lighttpd during install. 2017-01-28 21:37:21 +00:00
Promofaux
35828f9cea Source setupvars earlier in update/repair process 2017-01-28 19:05:55 +00:00
Promofaux
90af12fdb8 Remember the [@] 2017-01-28 18:41:37 +00:00
Promofaux
5fede23cf7 trying another tactic 2017-01-28 18:39:15 +00:00
Promofaux
bc4762f270 no need to stop dnsmasq/lighttpt if we're going to reload them at the end anyway. 2017-01-28 16:27:02 +00:00
Promofaux
01429d59bd more web checks 2017-01-28 15:45:14 +00:00
Promofaux
731d15f9b5 don't display web admin info in final dialog if it's not selected 2017-01-28 15:43:33 +00:00
Promofaux
f0bd7fae5c ) not } 2017-01-28 15:32:07 +00:00
Promofaux
f8322cc2d4 use the web install flag. Could be optimised 2017-01-28 15:25:02 +00:00
Promofaux
dfdb9e393b move repo clone to function 2017-01-28 15:15:42 +00:00
Promofaux
bd07d7f32e Only install web dependenices if flag is true 2017-01-28 15:11:39 +00:00
Promofaux
f588c6f93c introduce web toggle flag 2017-01-28 14:40:47 +00:00
Promofaux
d9ec3d2c22 spelling 2017-01-28 14:28:18 +00:00
Promofaux
e2b87759d8 split out web dependencies 2017-01-28 14:27:08 +00:00
Dan Schaper
52e0aa11af
Have install create directory 2017-01-27 22:06:48 -08:00
Dan Schaper
1421c31179
install index and blockingpage assets. 2017-01-27 21:41:17 -08:00
Dan Schaper
91bcc18e6a
Make full path to directory for pihole web page. 2017-01-27 21:40:52 -08:00
Dan Schaper
5b43f13935
Fresh install web page directory tests 2017-01-27 20:24:20 -08:00
DL6ER
2c16a75ef1
Use stat to get owner of /var/log 2017-01-27 14:28:59 +01:00
DL6ER
6fd7e0311c
Install customized version of logrotate script 2017-01-27 14:16:24 +01:00
Dan Schaper
cec214f900
User decline to install shouldn't be an error return. 2017-01-26 14:38:02 -08:00
Dan Schaper
b16f797317
firewall-cmd --state returns 0 on 'running' non 0 on 'not running',
so check retval and not text returned.

FirewallD conversion to multicall

IPTables test
2017-01-24 19:57:31 -08:00
Dan Schaper
8bba3a257c
Merge branch 'tweak/firewall_tests' into tweak/firewall_warning 2017-01-24 11:51:41 -08:00
Dan Schaper
31aa42c35e
Transparency in sudo refire. 2017-01-23 14:28:56 -08:00
Dan Schaper
f7a17248b7
Warn with whiptail if firewall-cmd is running. 2017-01-23 14:19:51 -08:00
Adam Warner
77554fbd13 Merge pull request #1145 from pi-hole/cleanup/more_shellcheck
Cleanup/more shellcheck
2017-01-22 13:31:09 +00:00
Dan Schaper
eaf6938c35
DNS whiptail from radio to menu 2017-01-21 16:14:05 -08:00
Dan Schaper
0635309f23
Move distribution check to function.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-21 12:34:47 -08:00
Dan Schaper
cef0211c00 Merge pull request #1151 from pi-hole/fix/CIDR
Include CIDR notation for IPv4 non-natural blocks.
2017-01-19 14:02:28 -08:00
Dan Schaper
86052540d9
Add back CIDR notation for non-natural blocks. Includes multi-address
configs.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-19 13:50:42 -08:00
Dan Schaper
62a5e36afd
Remove firewall configuration from update portion of script.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-17 14:40:30 -08:00
Dan Schaper
00b28f0aed
IPTables Whiptal option to install.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-17 14:19:19 -08:00
Dan Schaper
ec8c40b69b
Fix array declaration for Fedora package management.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-17 13:00:17 -08:00
Dan Schaper
34df34ba27
Actually rm the Pi-hole scripts.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-14 20:16:27 -08:00
Dan Schaper
2689b37c35
Combine multiple calls to interface length code.
&& ||

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-14 19:40:29 -08:00
Dan Schaper
9b6427144f
|| && conversion.
Fedora deps array.

Use full name of `source`

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-14 19:39:37 -08:00
Dan Schaper
9212eea8bd
Only ignore DOWN interfaces, tun interfaces are UNKNOWN.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-14 15:25:42 -08:00
DL6ER
0b72c639fb
Check for existance of iptables command. Fixes #1125 2017-01-13 18:13:10 +01:00
Dan Schaper
c58a95ca2e
setDNS whiptail direct, not in array.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-09 00:10:14 -08:00
Dan Schaper
80a3bce6d5
PI_HOLE_INSTALL_DIR global variable
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

`"${pw}"`

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

Absolute path for pihole

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

Debian PKG_INSTALL as array

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-09 00:10:06 -08:00
Dan Schaper
6f0289de49
Vestigial variable that was never populated.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-09 00:09:52 -08:00
Dan Schaper
0966d7660e
Take out some whiptail subshells that aren't needed.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

Take out some whiptail subshells that aren't needed.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-09 00:09:45 -08:00
Dan Schaper
27e90cc4e6
Repetitive ip route get was resetting counts.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-09 00:09:39 -08:00
Dan Schaper
b785213c3a
Shellcheck for Test for $? -eq 0
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

Shellcheck for Test for $? -eq 0

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-09 00:09:32 -08:00
Dan Schaper
0e4d5e9103
Bash splitting and globin
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-08 14:49:08 -08:00
Mcat12
76531da340 Merge pull request #1067 from pi-hole/fix/firewall_redux
Fix/firewall redux
2017-01-02 11:36:38 -05:00
Adam Warner
12bec1df68 Merge pull request #1048 from pi-hole/tweak/simplify_webpage.sh
Major simplification of webpage.sh + extend DHCP to IPv6
2017-01-02 14:28:26 +00:00
DL6ER
85f0241c0d
Reprocess DHCP settings after update 2017-01-02 10:50:59 +01:00
Dan Schaper
8ee2bdec4d
Plain grep, escape the special characters.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-01 14:38:10 -08:00
Dan Schaper
de6ce276d0
Merge branch 'development' of github.com:pi-hole/pi-hole into fix/firewall_redux 2017-01-01 14:13:32 -08:00
Dan Schaper
fbea81dcd7 Merge pull request #1068 from pi-hole/fix/anti_glob
Misc tweaks to the installer script. Defensive git cloning, and ability to source the installer script.
2017-01-01 14:10:55 -08:00
Dan Schaper
502c349b8b
Merge branches 'development' and 'fix/firewall_redux' of github.com:pi-hole/pi-hole into fix/firewall_redux 2017-01-01 13:47:56 -08:00
Adam Warner
5fb0aa70de Merge pull request #1008 from pi-hole/feature/track_pre-installed_packages
Feature/track pre installed packages
2017-01-01 20:29:02 +00:00
Dan Schaper
7750e1344c
DRY displayFinalMessage
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-01 07:10:14 -08:00
Dan Schaper
8be37130e9
Move first check to main(), basic-install.sh can now be sourced.
Set `PH_TEST=true` then `source basic-install.sh`. Careful for `set -e`.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-01 06:45:03 -08:00
Dan Schaper
fa055481a7
Shellcheck screen size
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-01 06:32:49 -08:00
Dan Schaper
ad07655630
Defensive git cloning
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-01 00:14:12 -08:00
Dan Schaper
7cceb8615a
make_repo more defensive.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-01-01 00:13:51 -08:00
Dan Schaper
45587194e5
Regex fun
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-31 21:33:05 -08:00
Dan Schaper
ccbf391913
More intelligence in iptables rulesets. Account for Policy ACCEPT, with
default rule DROP or REJECT as last rule.

Regex the conditions to make sure we are getting the right conditions.

Reframe the logic to simplify the chains and rules

Reframe the logic to simplify the chains and rules

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-31 21:16:22 -08:00
DL6ER
02d4b6794c Merge pull request #1066 from dgnthr/patch-1
Fixed a typo in the installation script
2016-12-31 17:30:56 +01:00
Dominik G
836b717346 Fixed a typo in the installation script 2016-12-31 17:25:48 +01:00
DL6ER
1a3bdbaabf Merge pull request #1057 from pi-hole/new/whitelistonblockingpage
Allow whitelisting from blocking page
2016-12-30 21:07:34 +01:00
Mcat12
5e35fdbc52 Save blocking page CSS to pihole directory instead of admin 2016-12-30 14:42:15 -05:00
Dan Schaper
a4a9879643
Restructure firewall detection and application.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-29 15:57:29 -08:00
Dan Schaper
ea9ec384c6
Disambiguate nested ifs.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-29 01:35:52 -08:00
Dan Schaper
bbb958b7ed
Detect RPF breaking kernel updates.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-29 01:34:49 -08:00
DL6ER
03d4fcd17d Don't actually have to reapply DHCP settings since we are going to save it in a different file we don't replace by a template 2016-12-28 16:32:24 +00:00
DL6ER
02d658be65 Look for DHCP / DNS server settings which would have to be reapplied after updating (since we overwrite 01-pihole.conf) 2016-12-28 16:31:55 +00:00
Dan Schaper
b02730a5ad
Merge branches 'development' and 'feature/track_pre-installed_packages' of github.com:pi-hole/pi-hole into feature/track_pre-installed_packages
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

# Conflicts:
#	automated install/basic-install.sh
2016-12-27 22:50:00 -08:00
Dan Schaper
9a9cb61345
Shift epel-release to installer dependencies for CentOS
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-27 12:59:53 -08:00
Dan Schaper
c3b51b4ceb Merge branch 'development' into feature/track_pre-installed_packages 2016-12-27 12:37:19 -08:00
Dan Schaper
bc6a985f7c
Merge branch 'development' of github.com:pi-hole/pi-hole into tweak/subshells 2016-12-27 11:53:46 -08:00
Dan Schaper
7320fc11d2
Check command -v directly, instead of subshelling out.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-27 11:53:23 -08:00
Dan Schaper
a328326e39
Formatting
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-27 11:41:07 -08:00
Dan Schaper
4eedf8a746
Always update package cache where we can.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-27 10:59:24 -08:00
Dan Schaper
c5f5252145 Merge pull request #961 from pi-hole/customblockpage
Custom Pi-Hole block page
2016-12-27 10:25:03 -08:00
Mcat12
7fadd469c9 Merge pull request #1038 from pi-hole/fix/IPV6_detection
Check IPv6 routing
2016-12-27 11:42:23 -05:00
Dan Schaper
7eb6124721
Don't call for package installs if there are no packages to install.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 16:57:07 -08:00
Dan Schaper
f458780ba7
Rebase onto development
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 16:56:31 -08:00
Dan Schaper
8ad52806de
Quiet DNF
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 16:54:23 -08:00
Dan Schaper
dc22a50dcc
Fedora dependency installer overhaul
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

Modify Fedora dependency installer

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>

Fedora now installs and arrays only non-installed packages. Fedora also noops the cache update, since it updates at every dnf call anyays.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 16:54:20 -08:00
Dan Schaper
852341c601
Check for installation status within the parent function.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 16:54:16 -08:00
Dan Schaper
d5ed6c1901
Find which packages already exist and only install new packages. Set up for unintall to know what packages we installed for later removal.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 16:54:13 -08:00
Dan Schaper
da41383476
Check IPv6 to see if the route is reachable, if not, don't use.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 15:26:05 -08:00
Dan Schaper
6ff79835da
If only one interface available, don't show whiptail, just use that interface.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 15:08:39 -08:00
Dan Schaper
1d608b204a
Only allow UP interfaces to be selected. (DOWN interfaces would have not given IP addresses anyways.)
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 14:50:50 -08:00
Dan Schaper
c2b8bed3a8
Get the IP address that is the source for the default route out. Fixes interfaces with multiple IP's assigned getting the wrong IPv4 chosen.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2016-12-24 14:43:57 -08:00
Adam Warner
d12efccd0b Merge pull request #1028 from pi-hole/bcambl-selinux_notification
Bcambl selinux notification
2016-12-23 17:36:33 +00:00
Mcat12
54afffed19 Remove newline
Issue was already fixed
2016-12-23 12:30:33 -05:00
Mcat12
fc8fcdbece Add newline 2016-12-23 12:28:18 -05:00
Promofaux
abd1fedc9d . 2016-12-23 17:25:55 +00:00
Promofaux
9725985037 printf to echo. idgaf 2016-12-23 17:24:33 +00:00
Promofaux
754f3359ec too many echos spoil the branch 2016-12-23 17:22:31 +00:00
Promofaux
4c131b8c28 newlines 2016-12-23 17:21:23 +00:00
Promofaux
15c674ba29 verbosity 2016-12-23 17:20:33 +00:00
Promofaux
00aff6a906 maybe 2016-12-23 17:16:03 +00:00
Promofaux
c45c3a72b5 words words words 2016-12-23 17:06:33 +00:00
Promofaux
662d450651 adjust size of whiptail dialog 2016-12-23 16:58:58 +00:00
Promofaux
a8897becd2 Make sure whiptail is installed... 2016-12-23 16:55:56 +00:00
Promofaux
fdb64a5702 untested convert user prompt to whiptail 2016-12-23 16:53:42 +00:00
Mcat12
73a80ff7dc Align installer output for updating repo 2016-12-23 11:51:34 -05:00
Promofaux
a795fd698d Merge branch 'selinux_notification' of https://github.com/bcambl/pi-hole into bcambl-selinux_notification 2016-12-23 16:48:16 +00:00
bcambl
2fb0dc0a4a add warning if SELinux is Enforcing 2016-12-23 10:27:52 -06:00