mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-21 21:53:43 +00:00
adminlte->web
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
0385b1d076
commit
71357ecae7
8 changed files with 20 additions and 20 deletions
|
@ -150,7 +150,7 @@ You can read our [Core Feature Breakdown](https://docs.pi-hole.net/core/pihole-c
|
||||||
|
|
||||||
### The Web Interface Dashboard
|
### The Web Interface Dashboard
|
||||||
|
|
||||||
This [optional dashboard](https://github.com/pi-hole/AdminLTE) allows you to view stats, change settings, and configure your Pi-hole. It's the power of the Command Line Interface, with none of the learning curve!
|
This [optional dashboard](https://github.com/pi-hole/web) allows you to view stats, change settings, and configure your Pi-hole. It's the power of the Command Line Interface, with none of the learning curve!
|
||||||
|
|
||||||
Some notable features include:
|
Some notable features include:
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ get_sys_stats() {
|
||||||
if [[ -n "${ph_ver_raw[0]}" ]]; then
|
if [[ -n "${ph_ver_raw[0]}" ]]; then
|
||||||
ph_core_ver="${ph_ver_raw[0]}"
|
ph_core_ver="${ph_ver_raw[0]}"
|
||||||
if [[ ${#ph_ver_raw[@]} -eq 2 ]]; then
|
if [[ ${#ph_ver_raw[@]} -eq 2 ]]; then
|
||||||
# AdminLTE not installed
|
# web not installed
|
||||||
ph_lte_ver="(not installed)"
|
ph_lte_ver="(not installed)"
|
||||||
ph_ftl_ver="${ph_ver_raw[1]}"
|
ph_ftl_ver="${ph_ver_raw[1]}"
|
||||||
else
|
else
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Please see LICENSE file for your rights under this license.
|
# Please see LICENSE file for your rights under this license.
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
readonly ADMIN_INTERFACE_GIT_URL="https://github.com/pi-hole/AdminLTE.git"
|
readonly ADMIN_INTERFACE_GIT_URL="https://github.com/pi-hole/web.git"
|
||||||
readonly ADMIN_INTERFACE_DIR="/var/www/html/admin"
|
readonly ADMIN_INTERFACE_DIR="/var/www/html/admin"
|
||||||
readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git"
|
readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git"
|
||||||
readonly PI_HOLE_FILES_DIR="/etc/.pihole"
|
readonly PI_HOLE_FILES_DIR="/etc/.pihole"
|
||||||
|
|
|
@ -97,10 +97,10 @@ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
|
||||||
WEB_HASH="$(get_local_hash /var/www/html/admin)"
|
WEB_HASH="$(get_local_hash /var/www/html/admin)"
|
||||||
addOrEditKeyValPair "${VERSION_FILE}" "WEB_HASH" "${WEB_HASH}"
|
addOrEditKeyValPair "${VERSION_FILE}" "WEB_HASH" "${WEB_HASH}"
|
||||||
|
|
||||||
GITHUB_WEB_VERSION="$(get_remote_version AdminLTE)"
|
GITHUB_WEB_VERSION="$(get_remote_version web)"
|
||||||
addOrEditKeyValPair "${VERSION_FILE}" "GITHUB_WEB_VERSION" "${GITHUB_WEB_VERSION}"
|
addOrEditKeyValPair "${VERSION_FILE}" "GITHUB_WEB_VERSION" "${GITHUB_WEB_VERSION}"
|
||||||
|
|
||||||
GITHUB_WEB_HASH="$(get_remote_hash AdminLTE "${WEB_BRANCH}")"
|
GITHUB_WEB_HASH="$(get_remote_hash web "${WEB_BRANCH}")"
|
||||||
addOrEditKeyValPair "${VERSION_FILE}" "GITHUB_WEB_HASH" "${GITHUB_WEB_HASH}"
|
addOrEditKeyValPair "${VERSION_FILE}" "GITHUB_WEB_HASH" "${GITHUB_WEB_HASH}"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -28,7 +28,7 @@ fi
|
||||||
getLocalVersion() {
|
getLocalVersion() {
|
||||||
case ${1} in
|
case ${1} in
|
||||||
"Pi-hole" ) echo "${CORE_VERSION:=N/A}";;
|
"Pi-hole" ) echo "${CORE_VERSION:=N/A}";;
|
||||||
"AdminLTE" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${WEB_VERSION:=N/A}";;
|
"web" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${WEB_VERSION:=N/A}";;
|
||||||
"FTL" ) echo "${FTL_VERSION:=N/A}";;
|
"FTL" ) echo "${FTL_VERSION:=N/A}";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ getLocalVersion() {
|
||||||
getLocalHash() {
|
getLocalHash() {
|
||||||
case ${1} in
|
case ${1} in
|
||||||
"Pi-hole" ) echo "${CORE_HASH:=N/A}";;
|
"Pi-hole" ) echo "${CORE_HASH:=N/A}";;
|
||||||
"AdminLTE" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${WEB_HASH:=N/A}";;
|
"web" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${WEB_HASH:=N/A}";;
|
||||||
"FTL" ) echo "${FTL_HASH:=N/A}";;
|
"FTL" ) echo "${FTL_HASH:=N/A}";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ getLocalHash() {
|
||||||
getRemoteHash(){
|
getRemoteHash(){
|
||||||
case ${1} in
|
case ${1} in
|
||||||
"Pi-hole" ) echo "${GITHUB_CORE_HASH:=N/A}";;
|
"Pi-hole" ) echo "${GITHUB_CORE_HASH:=N/A}";;
|
||||||
"AdminLTE" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${GITHUB_WEB_HASH:=N/A}";;
|
"web" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${GITHUB_WEB_HASH:=N/A}";;
|
||||||
"FTL" ) echo "${GITHUB_FTL_HASH:=N/A}";;
|
"FTL" ) echo "${GITHUB_FTL_HASH:=N/A}";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ getRemoteHash(){
|
||||||
getRemoteVersion(){
|
getRemoteVersion(){
|
||||||
case ${1} in
|
case ${1} in
|
||||||
"Pi-hole" ) echo "${GITHUB_CORE_VERSION:=N/A}";;
|
"Pi-hole" ) echo "${GITHUB_CORE_VERSION:=N/A}";;
|
||||||
"AdminLTE" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${GITHUB_WEB_VERSION:=N/A}";;
|
"web" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${GITHUB_WEB_VERSION:=N/A}";;
|
||||||
"FTL" ) echo "${GITHUB_FTL_VERSION:=N/A}";;
|
"FTL" ) echo "${GITHUB_FTL_VERSION:=N/A}";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -60,13 +60,13 @@ getRemoteVersion(){
|
||||||
getLocalBranch(){
|
getLocalBranch(){
|
||||||
case ${1} in
|
case ${1} in
|
||||||
"Pi-hole" ) echo "${CORE_BRANCH:=N/A}";;
|
"Pi-hole" ) echo "${CORE_BRANCH:=N/A}";;
|
||||||
"AdminLTE" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${WEB_BRANCH:=N/A}";;
|
"web" ) [ "${INSTALL_WEB_INTERFACE}" = true ] && echo "${WEB_BRANCH:=N/A}";;
|
||||||
"FTL" ) echo "${FTL_BRANCH:=N/A}";;
|
"FTL" ) echo "${FTL_BRANCH:=N/A}";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
versionOutput() {
|
versionOutput() {
|
||||||
if [ "$1" = "AdminLTE" ] && [ "${INSTALL_WEB_INTERFACE}" != true ]; then
|
if [ "$1" = "web" ] && [ "${INSTALL_WEB_INTERFACE}" != true ]; then
|
||||||
echo " WebAdmin not installed"
|
echo " WebAdmin not installed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -117,7 +117,7 @@ defaultOutput() {
|
||||||
versionOutput "Pi-hole" "$@"
|
versionOutput "Pi-hole" "$@"
|
||||||
|
|
||||||
if [ "${INSTALL_WEB_INTERFACE}" = true ]; then
|
if [ "${INSTALL_WEB_INTERFACE}" = true ]; then
|
||||||
versionOutput "AdminLTE" "$@"
|
versionOutput "web" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
versionOutput "FTL" "$@"
|
versionOutput "FTL" "$@"
|
||||||
|
@ -130,7 +130,7 @@ Show Pi-hole, Admin Console & FTL versions
|
||||||
|
|
||||||
Repositories:
|
Repositories:
|
||||||
-p, --pihole Only retrieve info regarding Pi-hole repository
|
-p, --pihole Only retrieve info regarding Pi-hole repository
|
||||||
-a, --admin Only retrieve info regarding AdminLTE repository
|
-a, --admin Only retrieve info regarding web repository
|
||||||
-f, --ftl Only retrieve info regarding FTL repository
|
-f, --ftl Only retrieve info regarding FTL repository
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
@ -143,7 +143,7 @@ Options:
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
"-p" | "--pihole" ) shift; versionOutput "Pi-hole" "$@";;
|
"-p" | "--pihole" ) shift; versionOutput "Pi-hole" "$@";;
|
||||||
"-a" | "--admin" ) shift; versionOutput "AdminLTE" "$@";;
|
"-a" | "--admin" ) shift; versionOutput "web" "$@";;
|
||||||
"-f" | "--ftl" ) shift; versionOutput "FTL" "$@";;
|
"-f" | "--ftl" ) shift; versionOutput "FTL" "$@";;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
* ) defaultOutput "$@";;
|
* ) defaultOutput "$@";;
|
||||||
|
|
|
@ -348,7 +348,7 @@ SetDNSServers() {
|
||||||
IFS=',' read -r -a array <<< "${args[2]}"
|
IFS=',' read -r -a array <<< "${args[2]}"
|
||||||
for index in "${!array[@]}"
|
for index in "${!array[@]}"
|
||||||
do
|
do
|
||||||
# Replace possible "\#" by "#". This fixes AdminLTE#1427
|
# Replace possible "\#" by "#". This fixes web#1427
|
||||||
local ip
|
local ip
|
||||||
ip="${array[index]//\\#/#}"
|
ip="${array[index]//\\#/#}"
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,11 @@ webroot="/var/www/html"
|
||||||
|
|
||||||
|
|
||||||
# We clone (or update) two git repositories during the install. This helps to make sure that we always have the latest versions of the relevant files.
|
# We clone (or update) two git repositories during the install. This helps to make sure that we always have the latest versions of the relevant files.
|
||||||
# AdminLTE is used to set up the Web admin interface.
|
# web is used to set up the Web admin interface.
|
||||||
# Pi-hole contains various setup scripts and files which are critical to the installation.
|
# Pi-hole contains various setup scripts and files which are critical to the installation.
|
||||||
# Search for "PI_HOLE_LOCAL_REPO" in this file to see all such scripts.
|
# Search for "PI_HOLE_LOCAL_REPO" in this file to see all such scripts.
|
||||||
# Two notable scripts are gravity.sh (used to generate the HOSTS file) and advanced/Scripts/webpage.sh (used to install the Web admin interface)
|
# Two notable scripts are gravity.sh (used to generate the HOSTS file) and advanced/Scripts/webpage.sh (used to install the Web admin interface)
|
||||||
webInterfaceGitUrl="https://github.com/pi-hole/AdminLTE.git"
|
webInterfaceGitUrl="https://github.com/pi-hole/web.git"
|
||||||
webInterfaceDir="${webroot}/admin"
|
webInterfaceDir="${webroot}/admin"
|
||||||
piholeGitUrl="https://github.com/pi-hole/pi-hole.git"
|
piholeGitUrl="https://github.com/pi-hole/pi-hole.git"
|
||||||
PI_HOLE_LOCAL_REPO="/etc/.pihole"
|
PI_HOLE_LOCAL_REPO="/etc/.pihole"
|
||||||
|
@ -334,7 +334,7 @@ package_manager_detect() {
|
||||||
# Packages required for the Web admin interface (stored as an array)
|
# Packages required for the Web admin interface (stored as an array)
|
||||||
# It's useful to separate this from Pi-hole, since the two repos are also setup separately
|
# It's useful to separate this from Pi-hole, since the two repos are also setup separately
|
||||||
PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-sqlite3" "${phpVer}-xml" "${phpVer}-intl")
|
PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-sqlite3" "${phpVer}-xml" "${phpVer}-intl")
|
||||||
# Prior to PHP8.0, JSON functionality is provided as dedicated module, required by Pi-hole AdminLTE: https://www.php.net/manual/json.installation.php
|
# Prior to PHP8.0, JSON functionality is provided as dedicated module, required by Pi-hole web: https://www.php.net/manual/json.installation.php
|
||||||
if [[ -z "${phpInsMajor}" || "${phpInsMajor}" -lt 8 ]]; then
|
if [[ -z "${phpInsMajor}" || "${phpInsMajor}" -lt 8 ]]; then
|
||||||
PIHOLE_WEB_DEPS+=("${phpVer}-json")
|
PIHOLE_WEB_DEPS+=("${phpVer}-json")
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -212,7 +212,7 @@ Available commands and options:
|
||||||
.br
|
.br
|
||||||
-p, --pihole Only retrieve info regarding Pi-hole repository
|
-p, --pihole Only retrieve info regarding Pi-hole repository
|
||||||
.br
|
.br
|
||||||
-a, --admin Only retrieve info regarding AdminLTE
|
-a, --admin Only retrieve info regarding web
|
||||||
repository
|
repository
|
||||||
.br
|
.br
|
||||||
-f, --ftl Only retrieve info regarding FTL repository
|
-f, --ftl Only retrieve info regarding FTL repository
|
||||||
|
@ -339,7 +339,7 @@ Displaying version information
|
||||||
|
|
||||||
\fBpihole -v -a -c\fR
|
\fBpihole -v -a -c\fR
|
||||||
.br
|
.br
|
||||||
Display the current version of AdminLTE
|
Display the current version of web
|
||||||
.br
|
.br
|
||||||
|
|
||||||
Temporarily disabling Pi-hole
|
Temporarily disabling Pi-hole
|
||||||
|
|
Loading…
Reference in a new issue