Commit graph

1005 commits

Author SHA1 Message Date
Dan Schaper
06875f2cc9
Merge branch 'release/v4.0' into fix/parse_pihole-FTL.conf 2018-07-30 14:32:29 -07:00
Dan Schaper
448fc7231c
Installed to /etc/pihole as PI_HOLE_CONFIG_DIR variable.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-30 14:26:07 -07:00
Dan Schaper
d0d030bafc
Moved file creation to proper function. Included bash variables for file
location. Set to pihole:pihole ownership with 644 permissions.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-30 14:02:18 -07:00
Dan Schaper
833131e15f
Merge pull request #2315 from pi-hole/fix/regex-file-ownership
Allow PHP to edit the regex file if web is installed
2018-07-30 06:36:20 -07:00
Dan Schaper
fb2810557a
Allow web user group to access regex.list
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-29 16:09:03 -07:00
Mcat12
57af0ba0a4
Use install to make the regex file
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-29 18:26:00 -04:00
Dan Schaper
17c1e64f7e
Moved FTL configuration copy in to scripts copy function.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-29 09:06:51 -07:00
Dan Schaper
af13ceac24
Touch file as ${USER} instead of copying template.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-29 08:42:59 -07:00
Mcat12
a55cc55338
Only touch the regex file if it doesn't already exist
The other permission calls will always be run so that the file is in the
expected state after install and repair.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-28 23:07:35 -04:00
Dan Schaper
b2fb3fd35a
Merge pull request #2310 from pi-hole/feature/pihole-FTL.conf
Include template pihole-FTL.conf
2018-07-28 20:04:39 -07:00
Mcat12
1a8d5fb4a9
Allow PHP to edit the regex file if installed
Fixes permissions error on the web interface when modifying the regex.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-28 21:57:39 -04:00
Mcat12
c73b5456eb
Fix "which" error leaking
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-28 21:12:05 -04:00
Mcat12
3d87398721
Fix check_service_active leaking error output
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-28 20:50:04 -04:00
Mark Drobnak
47b56d6123
Fix wrong git command flag
I could not find documentation on a `--head` flag, but there is a `--heads` flag which does the same thing.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-27 23:27:44 -04:00
Dan Schaper
512d2dd5f8
Source git repo and not /opt location.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-27 15:47:20 -07:00
Dan Schaper
ad20d5ac1c
Remove -t SOURCE and DIRECTORY reversal flag on install.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-27 15:39:37 -07:00
Dan Schaper
b79ff05e29
Move template files to own subdir. Include pihole-FTL.conf in templates.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-27 15:21:25 -07:00
Borats Nolan
32b50f8188 Change the word "folder" to "directory" since the pi-hole is intended to run on rpi with Linux on it.
Signed-off-by: Borats Nolan <borats@i.dont.use.email>
2018-07-28 02:35:39 +10:00
Dan Schaper
32cf94fc74
Merge pull request #2297 from pi-hole/bugfix/locales
Fixed locale issue, do not parse for string.
2018-07-26 16:44:52 -07:00
Adam Warner
9b1356ad01
Revert #2282
Signed-off-by: Adam Warner <adamw@rner.email>
2018-07-27 00:27:06 +01:00
Peter Robinson
45521b377a Use ip route rather than old net-tools route in chronometer.sh
The only use of net-tools is the use of route in chronometer.sh so
instead use the same method as used in piholeDebug.sh to get the
default gateway so there's no need to depend on net-tools anylonger.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2018-07-26 17:46:51 +01:00
Dan Schaper
46a366635c
Fixed locale issue, do not parse for string.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-26 05:30:05 -07:00
Dan Schaper
1877128fc4
Removes empty comment lines in basic-install.sh
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-20 10:38:13 -07:00
Mark Drobnak
9cd674b528
Merge pull request #2282 from RamSet/tweak/Port53
Updated port 53 check #2
2018-07-18 22:56:33 -04:00
RamSet
5aea7eb860 corrected function indentation
Signed-off-by: RamSet <RamSet@gmail.com>
2018-07-17 20:46:18 -06:00
Mark Drobnak
ec30df2020
Merge pull request #2277 from bcambl/centos_fedora_fixes
Installer fixes for Fedora & CentOS
2018-07-17 22:06:25 -04:00
RamSet
bb33427c79 fixed parsing error
Signed-off-by: RamSet <RamSet@gmail.com>
2018-07-17 18:09:25 -06:00
RamSet
28a16cebda Addressed lint errors.
Signed-off-by: RamSet <RamSet@gmail.com>
2018-07-17 18:06:32 -06:00
RamSet
49c79405bc changed flag and variable name
Signed-off-by: RamSet <RamSet@gmail.com>
2018-07-17 18:04:50 -06:00
RamSet
3098f32a07 Fixed intentation and corrected comments.
Signed-off-by: RamSet <RamSet@gmail.com>
2018-07-17 17:56:13 -06:00
Dan Schaper
69e06d89ff
Added missing for sourced file.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2018-07-16 22:36:58 -07:00
RamSet
56b04017e7 Port 53 check updated with 4 spaces.
Signed-off-by: RamSet <RamSet@gmail.com>
2018-07-16 11:29:12 -06:00
bcambl
fa9ecbdb81 add php-json to Fedora web deps
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-07-15 15:41:04 -06:00
bcambl
2bf6b29b8f trigger an install/upgrade of PHP after enabling the Remi repository
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-07-15 15:40:44 -06:00
Dan Schaper
9dba9fb366
Convert multiline echos to individual echo statements so they don't lead with different amounts of space.
Signed-off-by: Dan Schaper <dan.schaper@pihole.net>
2018-07-06 21:29:20 -07:00
Dan Schaper
a323b126e5
Finished space conversion
Signed-off-by: Dan Schaper <dan.schaper@pihole.net>
2018-07-05 23:47:55 -07:00
Mark Drobnak
0651f1bcd4
Merge pull request #2220 from rrobgill/installedphpcheck
Bugfix - Check version of installed php
2018-06-08 23:31:40 -04:00
Rob Gill
11f0ade921
comments
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-09 13:18:36 +10:00
Rob Gill
6381bdbf33
don't use major.minor for PHP 5
Signed-off-by: <rrobgill@protonmail.com>
2018-06-09 11:35:30 +10:00
Mcat12
4a75566a3b
Merge remote-tracking branch 'origin/development' into tweak/32bitOS_on_64bitCPU 2018-06-08 20:20:57 -04:00
Rob Gill
52aa52c3b1
remove duplicate declaration
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-07 08:19:26 +10:00
Mark Drobnak
6689e00e6a
Merge pull request #2212 from rrobgill/man-pages
Man page for pilhole-FTL
2018-06-05 21:33:54 -04:00
Rob Gill
a3569d88c9
Version strings & bash.
Fixed up the version checking. Thanks for your help @dschaper.

No longer uses the version string as returned, but uses the major and minor version numbers extracted from it, against the minimum of 5.5. 

Tested against real install of php 7.0, (and the version check logic separately tested against a variety of artificial version numbers, of multiple digits for both major and minor version. - Lesson learned, I'm never trusting bash again)

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-05 21:42:42 +10:00
Adam Warner
f2f6b6ede9
stickler complaints
Signed-off-by: Adam Warner <adamw@rner.email>
2018-06-05 09:29:03 +01:00
Adam Warner
7f81cfd45a
Stats can still be generated without logging, no need for this sentence
Signed-off-by: Adam Warner <adamw@rner.email>
2018-06-05 09:09:35 +01:00
Rob Gill
13b8e1a2ae
quotes.
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-05 15:09:07 +10:00
Rob Gill
36dbdf955d
Update basic-install.sh
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-05 14:48:24 +10:00
Rob Gill
714b6c98ef
codacy
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-05 14:45:01 +10:00
Rob Gill
7181d7ae6a
Left that fi
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-05 14:30:18 +10:00
Rob Gill
9422d57283
Check version of installed php
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-05 12:08:27 +10:00
Dan Schaper
feba4da0b8
Merge pull request #2161 from pi-hole/centos_remi-php7
CentOS install re-worked to provide PHP7 via Remi Repository
2018-06-03 10:54:32 -07:00
Rob Gill
ed7ebfd58d man page for pihole-FTL
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-03 22:15:26 +10:00
Mark Drobnak
23fbb3cf22
Merge pull request #2205 from rrobgill/manual-page
Manual page
2018-06-02 21:11:21 -04:00
Rob Gill
9970f3786f
Requested change
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-02 14:14:55 +10:00
Rob Gill
ef65bac79b
change status from INFO to CROSS
Signed-Off-By: Rob Gill <rrobgill@protonmail.com>
2018-06-02 11:27:35 +10:00
Rob Gill
c0837c726f
blank space
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-02 11:18:13 +10:00
Rob Gill
ce5429aba7
stickler
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-02 11:02:06 +10:00
Rob Gill
aa191e9202
Update basic-install.sh
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-02 10:46:07 +10:00
Rob Gill
a8f0283e93
Update basic-install.sh
This hands checking of lighttpd's status over to the existing check_service_active() function.

All other checks of service status within the install script are handled by this function.

Use of existing function:
Avoids duplication of service detection logic.
Uses return code to determine status, thereby avoids parsing text to determine status, and reliance on English language locale to determine activity, (which may also be broken on some systems (# 2204)

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-02 10:11:11 +10:00
Rob Gill
999e47a26c
Remove manual page
Tests for presence of pihole man page.
If it is present, deletes it and runs man-db to rebuild manual database.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-02 09:50:52 +10:00
Rob Gill
a8103ca22d
Manual page install function
Function to install man page.
Verifies that man pages are installed, and correct directory for the pihole manpage is present.
Copies file, and runs man-db to update man page database.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-02 09:45:04 +10:00
Mark Drobnak
1a30043776
Merge pull request #1768 from Al2Klimov/bugfix/install-invalid-user
basic-install.sh: fix "install: invalid user ''"
2018-06-01 19:27:51 -04:00
Alexander A. Klimov
3be1904653 basic-install.sh: fix "install: invalid user ''"
refs #1767
2018-06-01 10:20:40 +02:00
Rob Gill
cadd0e4244
move code back to correct location
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-01 14:03:13 +10:00
Rob Gill
f35ea9a3ca
replace code i missed during merge
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-06-01 11:57:59 +10:00
Rob Gill
0971630e01
Merge branch 'development' into uninstall-formatting 2018-06-01 07:17:02 +10:00
Rob Gill
b60a9fa371
merge (#2)
* remove package_check to avoid situations like #1760

Signed-off-by: Adam Warner <adamw@rner.email>

* Prevent redundant entries in to adlists.list

Grep ${args[3]} and only add if grep -c -eq 0

Signed-off-by: Ryan Knapper <ryanknapper@gmail.com>

* lan to local

Reduced differences.

Signed-off-by: Ryan Knapper <ryanknapper@gmail.com>

* Require exact match

Updated to require an exact match to reduce false-positives, as suggested by DL6ER.

Signed-off-by: Ryan Knapper <ryanknapper@gmail.com>

* fix empty ports on some systems

Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>

* debug user locale; improve function to parse variables and files

Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>

* Split declaration and population for stickler.

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

* implement dschapers suggestions--better command, less subshells, and finer formatting

Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>

* flip uninstall compatability check

Signed-off-by: bcambl <blayne@blaynecampbell.com>

* Update index.php

Avoiding calling empty() on a function allows this to work under PHP5. Making the check for blocklist generation in this way instead is compatible with both PHP5 and PHP7.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* Update index.php

thanks stickler-ci  .......

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* changes as requested 

changes as requested 

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* oh stickler bot...

accidentally a space

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* linting: Double quote to prevent globbing and word splitting

Signed-off-by: bcambl <blayne@blaynecampbell.com>

* unbind resolved on ubuntu 18.04

Stop systemd-resolved from interfering with dnsmasq/ftl
Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* restore resolvd.conf

If dnsmasq is removed, resolved will need to be restored.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* Update uninstall.sh

Signed-off-by: Rob Gill <rrobgill@protonmail.com>>

* Minor correction for double instance of the word "found".

Signed-off-by: RamSet <RamSet@gmail.com>

* message text

Signed-off-by: Rob Gill <rrobgill@protonmail.com>>

* relocate as function

The check for systemd-resolved DNSStubListener, and disabling as necessary is a new function, called just prior to start_service pihole-FTL.
The check for ubuntu bionic 18.04 specifically is removed.
The check if resolved is enabled is made with check_service_active()
An additional check that the dnsstublistener is enabled is made.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* Regex & case fix

grep & sed regexes  match commented or uncommented

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* Update basic-install.sh

Force reloading of relsolved config where available

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* reload resloved

reload resolved config if possible, restart otherwise

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* user-facing messages

Signed-off-by: Rob Gill <rrobgill@protonmail.com>

* move & clarify comments
2018-06-01 07:14:54 +10:00
Mark Drobnak
8523c0da32
Merge pull request #2180 from rrobgill/resolved/ubuntu-bionic
Disable SystemD's DNS Stub Resolver On Install
2018-05-31 09:32:49 -04:00
Rob Gill
f0dfa4d53d
Stickler-bot...
Signed-Off-By: Rob Gill <rrobgill@protonmail.com>
2018-05-31 13:43:49 +10:00
Rob Gill
f2bedddce4
Changes from #2167 converted to spaces
Signed-Off-By: Rob Gill <rrobgill@protonmail.com>
2018-05-31 13:37:52 +10:00
Rob Gill
552138e851
Appease stickler-bot.
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-31 13:24:09 +10:00
Rob Gill
ff71379a8e
Convert from two to four space indetation
Signed-Off-By: Rob Gill <rrobgill@protonmail.com>
2018-05-31 13:14:18 +10:00
Mcat12
34f5db9ed4
Merge branch 'development' into uninstall_compat_check
# Conflicts:
#	automated install/uninstall.sh
2018-05-30 22:08:20 -04:00
Mark Drobnak
87506852d1
Merge pull request #1761 from pi-hole/tweak/Uninstall
Tweak/uninstall
2018-05-30 21:19:59 -04:00
Rob Gill
e6893bc419
Update uninstall.sh
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-29 19:03:00 +10:00
Rob Gill
ebeab06710
Appease Stickler-bot
So... originally no changes were made to the code, but Stickler-bot was unimpressed, so I've followed its suggestions.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-29 18:59:55 +10:00
Rob Gill
1911c3690d
Style/Tabs to spaces
uninstall.sh contains a mix of tabs and spaces for indentation in different parts of the file.

Everywhere that used tabs has been converted to spaces, compatible with the indentation style used in basic_install.sh

No code has been altered, only the use of tabs and spaces in indention.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-29 17:59:39 +10:00
Rob Gill
20ccb7b558
move & clarify comments 2018-05-21 08:16:53 +10:00
Rob Gill
8cfe89604a
user-facing messages
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-17 07:44:07 +10:00
Rob Gill
15f0ba839f
reload resloved
reload resolved config if possible, restart otherwise

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-16 07:35:22 +10:00
Rob Gill
c400b914e5
Update basic-install.sh
Force reloading of relsolved config where available

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-16 07:28:32 +10:00
Rob Gill
a431c829cb
Regex & case fix
grep & sed regexes  match commented or uncommented

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-16 07:11:23 +10:00
Rob Gill
25d0e125e5
relocate as function
The check for systemd-resolved DNSStubListener, and disabling as necessary is a new function, called just prior to start_service pihole-FTL.
The check for ubuntu bionic 18.04 specifically is removed.
The check if resolved is enabled is made with check_service_active()
An additional check that the dnsstublistener is enabled is made.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-15 20:23:36 +10:00
Rob Gill
b89a78ce17
message text
Signed-off-by: Rob Gill <rrobgill@protonmail.com>>
2018-05-15 19:42:18 +10:00
Rob Gill
97809277df
Update uninstall.sh
Signed-off-by: Rob Gill <rrobgill@protonmail.com>>
2018-05-14 19:50:58 +10:00
Rob Gill
3d3e7a330c
restore resolvd.conf
If dnsmasq is removed, resolved will need to be restored.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-14 19:44:23 +10:00
Rob Gill
adf2275018
unbind resolved on ubuntu 18.04
Stop systemd-resolved from interfering with dnsmasq/ftl
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2018-05-14 19:38:12 +10:00
bcambl
c1ecfbfe63 linting: Double quote to prevent globbing and word splitting
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-05-12 19:39:17 -06:00
bcambl
d3dda443cd flip uninstall compatability check
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-05-04 00:02:47 -06:00
bcambl
ec3802c180 add 'which' dependency (missing on Fedora minimal)
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-05-03 23:41:42 -06:00
Adam Warner
76654c7856
Actually check for dnsmasq's existence before attempting to interact with it's service
Signed-off-by: Adam Warner <adamw@rner.email>
2018-05-03 21:16:31 +01:00
Adam Warner
a6e4b0fea5
- Test for existence of remote non-master branch of FTL before attemtping to check for update
- Move some functions from checkout to basic-install
- provide helpful error message on downlaod not existing

Signed-off-by: Adam Warner <adamw@rner.email>
2018-05-01 23:15:26 +01:00
bcambl
8ad37af70e CentOS install re-worked to include PHP7 via Remi repository
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-05-01 00:58:21 -06:00
Adam Warner
a07891e3e6
0 is not 1!!
Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-30 23:53:51 +01:00
Adam Warner
e946a35b18
Move dnsmasq check into FTLcheckUpdate
Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-30 23:50:35 +01:00
Adam Warner
68d7337f98
switch up dnsmasq detection logic
Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-30 23:42:41 +01:00
Adam Warner
8b4198fd8d
Merge pull request #1835 from Fauxsys/development
Fix for unattended installations #1767 #1768 #1834
2018-04-30 23:06:46 +01:00
Adam Warner
e17e69604c
Merge branch 'development' into new/RemoveDefaultBlocklists 2018-04-29 18:40:53 +01:00
Adam Warner
0c8a32b9ae
No need to stop services
This causes issues on a `pihole -r reconfigure`

Signed-off-by: Adam Warner <adamw@rner.email>
2018-04-29 18:27:10 +01:00
Adam Warner
d8c60aaae7
Merge pull request #2142 from bcambl/fix_fedora_ip_check
Fix static IP checking on Fedora
2018-04-29 14:36:07 +01:00