File pihole0-script-cleanups.patch of Package pihole
diff -Naur a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh
--- a/advanced/Scripts/chronometer.sh 2018-09-12 23:23:51.261404867 -0500
+++ b/advanced/Scripts/chronometer.sh 2018-09-13 08:33:20.769139859 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# shellcheck disable=SC1090,SC1091
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
@@ -131,7 +131,7 @@
}
# Set Colour Codes
- coltable="/opt/pihole/COL_TABLE"
+ coltable="/usr/share/pihole/COL_TABLE"
if [[ -f "${coltable}" ]]; then
source ${coltable}
else
diff -Naur a/advanced/Scripts/list.sh b/advanced/Scripts/list.sh
--- a/advanced/Scripts/list.sh 2018-09-12 23:23:51.271404833 -0500
+++ b/advanced/Scripts/list.sh 2018-09-13 08:35:02.128734635 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
@@ -24,7 +24,7 @@
listMain=""
listAlt=""
-colfile="/opt/pihole/COL_TABLE"
+colfile="/usr/share/pihole/COL_TABLE"
source ${colfile}
diff -Naur a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh
--- a/advanced/Scripts/piholeDebug.sh 2018-09-12 23:23:51.331404626 -0500
+++ b/advanced/Scripts/piholeDebug.sh 2018-09-13 08:53:23.514320430 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
@@ -22,7 +22,7 @@
######## GLOBAL VARS ########
# These variables would normally be next to the other files
# but we need them to be first in order to get the colors needed for the script output
-PIHOLE_SCRIPTS_DIRECTORY="/opt/pihole"
+PIHOLE_SCRIPTS_DIRECTORY="/usr/share/pihole"
PIHOLE_COLTABLE_FILE="${PIHOLE_SCRIPTS_DIRECTORY}/COL_TABLE"
# These provide the colors we need for making the log more readable
@@ -67,8 +67,8 @@
CRON_D_DIRECTORY="/etc/cron.d"
DNSMASQ_D_DIRECTORY="/etc/dnsmasq.d"
PIHOLE_DIRECTORY="/etc/pihole"
-PIHOLE_SCRIPTS_DIRECTORY="/opt/pihole"
-BIN_DIRECTORY="/usr/local/bin"
+PIHOLE_SCRIPTS_DIRECTORY="/usr/share/pihole"
+BIN_DIRECTORY="/usr/bin"
RUN_DIRECTORY="/run"
LOG_DIRECTORY="/var/log"
WEB_SERVER_LOG_DIRECTORY="${LOG_DIRECTORY}/lighttpd"
diff -Naur a/advanced/Scripts/piholeLogFlush.sh b/advanced/Scripts/piholeLogFlush.sh
--- a/advanced/Scripts/piholeLogFlush.sh 2018-09-12 23:23:51.341404591 -0500
+++ b/advanced/Scripts/piholeLogFlush.sh 2018-09-13 08:53:46.254229064 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
@@ -8,7 +8,7 @@
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
-colfile="/opt/pihole/COL_TABLE"
+colfile="/usr/share/pihole/COL_TABLE"
source ${colfile}
# Determine database location
diff -Naur a/advanced/Scripts/query.sh b/advanced/Scripts/query.sh
--- a/advanced/Scripts/query.sh 2018-09-12 23:23:51.361404523 -0500
+++ b/advanced/Scripts/query.sh 2018-09-13 08:54:33.294039977 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# shellcheck disable=SC1090
# Pi-hole: A black hole for Internet advertisements
# (c) 2018 Pi-hole, LLC (https://pi-hole.net)
@@ -20,7 +20,7 @@
blockpage=""
matchType="match"
-colfile="/opt/pihole/COL_TABLE"
+colfile="/usr/share/pihole/COL_TABLE"
source "${colfile}"
# Print each subdomain
diff -Naur a/advanced/Scripts/version.sh b/advanced/Scripts/version.sh
--- a/advanced/Scripts/version.sh 2018-09-12 23:23:51.441404247 -0500
+++ b/advanced/Scripts/version.sh 2018-09-14 22:12:00.070501773 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
diff -Naur a/gravity.sh b/gravity.sh
--- a/gravity.sh 2018-09-12 23:23:51.901402661 -0500
+++ b/gravity.sh 2018-09-13 09:02:19.972157969 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# shellcheck disable=SC1090
# Pi-hole: A black hole for Internet advertisements
@@ -13,13 +13,13 @@
export LC_ALL=C
-coltable="/opt/pihole/COL_TABLE"
+coltable="/usr/share/pihole/COL_TABLE"
source "${coltable}"
-regexconverter="/opt/pihole/wildcard_regex_converter.sh"
+regexconverter="/usr/share/pihole/wildcard_regex_converter.sh"
source "${regexconverter}"
basename="pihole"
-PIHOLE_COMMAND="/usr/local/bin/${basename}"
+PIHOLE_COMMAND="/usr/bin/${basename}"
piholeDir="/etc/${basename}"
diff -Naur a/pihole b/pihole
--- a/pihole 2018-09-12 23:23:51.991402351 -0500
+++ b/pihole 2018-09-13 09:03:35.261853354 -0500
@@ -9,7 +9,7 @@
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
-readonly PI_HOLE_SCRIPT_DIR="/opt/pihole"
+readonly PI_HOLE_SCRIPT_DIR="/usr/share/pihole"
readonly wildcardlist="/etc/dnsmasq.d/03-pihole-wildcard.conf"
readonly colfile="${PI_HOLE_SCRIPT_DIR}/COL_TABLE"
source "${colfile}"