Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Kevin Dalleau
pi-hole
Commits
6eedfb57
Commit
6eedfb57
authored
8 years ago
by
Adam Warner
Committed by
GitHub
8 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #676 from pi-hole/development
2.9.1
parents
ec6ecf0d
edf81a23
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
23 deletions
+31
-23
adlists.default
adlists.default
+0
-1
advanced/Scripts/piholeLogFlush.sh
advanced/Scripts/piholeLogFlush.sh
+1
-1
advanced/bash-completion/pihole
advanced/bash-completion/pihole
+1
-1
advanced/pihole.cron
advanced/pihole.cron
+2
-2
automated install/basic-install.sh
automated install/basic-install.sh
+18
-17
pihole
pihole
+9
-1
No files found.
adlists.default
View file @
6eedfb57
...
...
@@ -14,7 +14,6 @@
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
# Other lists we consider safe:
http://adblock.gjtech.net/?format=unix-hosts
http://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
...
...
This diff is collapsed.
Click to expand it.
advanced/Scripts/piholeLogFlush.sh
View file @
6eedfb57
...
...
@@ -11,5 +11,5 @@
# (at your option) any later version.
echo
-n
"::: Flushing /var/log/pihole.log ..."
truncate
-s
0
/var/log/pihole.log
echo
" "
>
/var/log/pihole.log
echo
"... done!"
This diff is collapsed.
Click to expand it.
advanced/bash-completion/pihole
View file @
6eedfb57
...
...
@@ -4,7 +4,7 @@ _pihole()
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="
whitelist blacklist debug flush updateDashboard updateGravity setupLCD chronometer uninstall help
"
opts="
blacklist chronometer debug flush help query setupLCD uninstall updateDashboard updateGravity updatePihole version whitelist
"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
...
...
This diff is collapsed.
Click to expand it.
advanced/pihole.cron
View file @
6eedfb57
...
...
@@ -21,6 +21,6 @@
# This will be used for a historical view of your Pi-hole's performance
#50 23 * * * root /usr/local/bin/dailyLog.sh # note: this is outdated
# Pi-hole: Flush the log daily at
11:58
so it doesn't get out of control
# Pi-hole: Flush the log daily at
00:00
so it doesn't get out of control
# Stats will be viewable in the Web interface thanks to the cron job above
58 23
* * * root /usr/local/bin/pihole flush
00 00
* * * root /usr/local/bin/pihole flush
This diff is collapsed.
Click to expand it.
automated install/basic-install.sh
View file @
6eedfb57
...
...
@@ -57,7 +57,24 @@ else
fi
# Compatibility
if
[
-x
"
$(
command
-v
rpm
)
"
]
;
then
if
[
-x
"
$(
command
-v
apt-get
)
"
]
;
then
# Debian Family
PKG_MANAGER
=
"apt-get"
PKG_CACHE
=
"/var/cache/apt"
UPDATE_PKG_CACHE
=
"
$PKG_MANAGER
-qq update"
PKG_UPDATE
=
"
$PKG_MANAGER
upgrade"
PKG_INSTALL
=
"
$PKG_MANAGER
--yes --quiet install"
PKG_COUNT
=
"
$PKG_MANAGER
-s -o Debug::NoLocking=true upgrade | grep -c ^Inst"
INSTALLER_DEPS
=(
apt-utils whiptail dhcpcd5
)
PIHOLE_DEPS
=(
dnsutils bc dnsmasq lighttpd php5-common php5-cgi php5 git curl unzip wget
sudo
netcat cron
)
LIGHTTPD_USER
=
"www-data"
LIGHTTPD_GROUP
=
"www-data"
LIGHTTPD_CFG
=
"lighttpd.conf.debian"
package_check
()
{
dpkg-query
-W
-f
=
'${Status}'
"
$1
"
2>/dev/null |
grep
-c
"ok installed"
}
elif
[
-x
"
$(
command
-v
rpm
)
"
]
;
then
# Fedora Family
if
[
-x
"
$(
command
-v
dnf
)
"
]
;
then
PKG_MANAGER
=
"dnf"
...
...
@@ -77,22 +94,6 @@ if [ -x "$(command -v rpm)" ];then
package_check
()
{
rpm
-qa
|
grep
^
$1
-
>
/dev/null
}
elif
[
-x
"
$(
command
-v
apt-get
)
"
]
;
then
# Debian Family
PKG_MANAGER
=
"apt-get"
PKG_CACHE
=
"/var/cache/apt"
UPDATE_PKG_CACHE
=
"
$PKG_MANAGER
-qq update"
PKG_UPDATE
=
"
$PKG_MANAGER
upgrade"
PKG_INSTALL
=
"
$PKG_MANAGER
--yes --quiet install"
PKG_COUNT
=
"
$PKG_MANAGER
-s -o Debug::NoLocking=true upgrade | grep -c ^Inst"
INSTALLER_DEPS
=(
apt-utils whiptail dhcpcd5
)
PIHOLE_DEPS
=(
dnsutils bc dnsmasq lighttpd php5-common php5-cgi php5 git curl unzip wget
sudo
netcat
)
LIGHTTPD_USER
=
"www-data"
LIGHTTPD_GROUP
=
"www-data"
LIGHTTPD_CFG
=
"lighttpd.conf.debian"
package_check
()
{
dpkg-query
-W
-f
=
'${Status}'
"
$1
"
2>/dev/null |
grep
-c
"ok installed"
}
else
echo
"OS distribution not supported"
exit
...
...
This diff is collapsed.
Click to expand it.
pihole
View file @
6eedfb57
...
...
@@ -72,7 +72,15 @@ function setupLCDFunction {
function
queryFunc
{
domain
=
$2
for
list
in
/etc/pihole/list.
*
;
do
echo
$list
;
grep
${
domain
}
$list
;
done
for
list
in
/etc/pihole/list.
*
do
count
=
$(
grep
${
domain
}
$list
|
wc
-l
)
echo
":::
${
list
}
(
${
count
}
results)"
if
[[
${
count
}
>
0
]]
;
then
grep
${
domain
}
${
list
}
fi
echo
""
done
exit
1
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment