Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryubiuser <ckoenig@posteo.de>2022-08-24 08:21:04 +0300
committerGitHub <noreply@github.com>2022-08-24 08:21:04 +0300
commit66eeee5548cda67433adcd4681c118218d8b2731 (patch)
treeb2670d733adf195ea6b9633c6f3d5a1536baa271
parent597c045f9e44506a914514e48fc9770df1ea0ac9 (diff)
parenteeccfb27f85fdf82d9e9e05ab0ed457c10bac11e (diff)
Remove the email function (#4870)
- **What does this PR aim to accomplish?:** We offered to set an administrator email which was shown on the blockpage. With the removal of the blockpage (https://github.com/pi-hole/pi-hole/pull/3910) this function is not needed anymore. Corresponding web interface PR: https://github.com/pi-hole/AdminLTE/pull/2301
-rwxr-xr-xadvanced/Scripts/webpage.sh33
-rw-r--r--advanced/bash-completion/pihole2
-rw-r--r--advanced/index.php2
-rw-r--r--manpages/pihole.85
4 files changed, 2 insertions, 40 deletions
diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh
index 29c53bd6..3ee48aef 100755
--- a/advanced/Scripts/webpage.sh
+++ b/advanced/Scripts/webpage.sh
@@ -46,7 +46,6 @@ Options:
-c, celsius Set Celsius as preferred temperature unit
-f, fahrenheit Set Fahrenheit as preferred temperature unit
-k, kelvin Set Kelvin as preferred temperature unit
- -e, email Set an administrative contact address for the Block Page
-h, --help Show this help dialog
-i, interface Specify dnsmasq's interface listening behavior
-l, privacylevel Set privacy level (0 = lowest, 3 = highest)
@@ -568,37 +567,6 @@ RemoveDHCPStaticAddress() {
}
-SetAdminEmail() {
- if [[ "${1}" == "-h" ]] || [[ "${1}" == "--help" ]]; then
- echo "Usage: pihole -a email <address>
-Example: 'pihole -a email admin@address.com'
-Set an administrative contact address for the Block Page
-
-Options:
- \"\" Empty: Remove admin contact
- -h, --help Show this help dialog"
- exit 0
- fi
-
- if [[ -n "${args[2]}" ]]; then
-
- # Sanitize email address in case of security issues
- # Regex from https://stackoverflow.com/a/2138832/4065967
- local regex
- regex="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\$"
- if [[ ! "${args[2]}" =~ ${regex} ]]; then
- echo -e " ${CROSS} Invalid email address"
- exit 0
- fi
-
- addOrEditKeyValPair "${setupVars}" "ADMIN_EMAIL" "${args[2]}"
- echo -e " ${TICK} Setting admin contact to ${args[2]}"
- else
- addOrEditKeyValPair "${setupVars}" "ADMIN_EMAIL" ""
- echo -e " ${TICK} Removing admin contact"
- fi
-}
-
SetListeningMode() {
source "${setupVars}"
@@ -847,7 +815,6 @@ main() {
"-h" | "--help" ) helpFunc;;
"addstaticdhcp" ) AddDHCPStaticAddress;;
"removestaticdhcp" ) RemoveDHCPStaticAddress;;
- "-e" | "email" ) SetAdminEmail "$3";;
"-i" | "interface" ) SetListeningMode "$@";;
"-t" | "teleporter" ) Teleporter;;
"adlist" ) CustomizeAdLists;;
diff --git a/advanced/bash-completion/pihole b/advanced/bash-completion/pihole
index 25208a35..29a3270d 100644
--- a/advanced/bash-completion/pihole
+++ b/advanced/bash-completion/pihole
@@ -15,7 +15,7 @@ _pihole() {
COMPREPLY=( $(compgen -W "${opts_lists}" -- ${cur}) )
;;
"admin")
- opts_admin="celsius email fahrenheit interface kelvin password privacylevel"
+ opts_admin="celsius fahrenheit interface kelvin password privacylevel"
COMPREPLY=( $(compgen -W "${opts_admin}" -- ${cur}) )
;;
"checkout")
diff --git a/advanced/index.php b/advanced/index.php
index 350eb602..9a2b19e6 100644
--- a/advanced/index.php
+++ b/advanced/index.php
@@ -34,7 +34,7 @@ if ($serverName === "pi.hole"
// When directly browsing via IP or authorized hostname
// Render splash/landing page based off presence of $landPage file
// Unset variables so as to not be included in $landPage or $splashPage
- unset($svPasswd, $svEmail, $authorizedHosts, $validExtTypes, $currentUrlExt);
+ unset($authorizedHosts);
// If $landPage file is present
if (is_file(getcwd()."/$landPage")) {
unset($serverName, $viewPort); // unset extra variables not to be included in $landpage
diff --git a/manpages/pihole.8 b/manpages/pihole.8
index 4b1e5154..11c21b28 100644
--- a/manpages/pihole.8
+++ b/manpages/pihole.8
@@ -11,8 +11,6 @@ Pi-hole : A black-hole for internet advertisements
.br
\fBpihole -a\fR (\fB-c|-f|-k\fR)
.br
-\fBpihole -a -e\fR email
-.br
\fBpihole -a -i\fR interface
.br
\fBpihole -a -l\fR privacylevel
@@ -133,9 +131,6 @@ Available commands and options:
.br
-k, kelvin Set Kelvin as preferred temperature unit
.br
- -e, email Set an administrative contact address for the
- Block Page
-.br
-i, interface Specify dnsmasq's interface listening behavior
.br
-l, privacylevel <level> Set privacy level