mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Move parse utility to be near other parsing functions.
This commit is contained in:
parent
e3c7a1f31f
commit
42bff1ce1b
@ -88,6 +88,20 @@ block_parse() {
|
||||
log_write "${1}"
|
||||
}
|
||||
|
||||
lsof_parse() {
|
||||
local user
|
||||
local process
|
||||
local match
|
||||
|
||||
user=$(echo ${1} | cut -f 3 -d ' ' | cut -c 2-)
|
||||
process=$(echo ${1} | cut -f 2 -d ' ' | cut -c 2-)
|
||||
if [[ ${2} -eq ${process} ]]; then
|
||||
match="as required."
|
||||
else
|
||||
match="incorrectly."
|
||||
fi
|
||||
log_echo -l "by ${user} for ${process} ${match}"
|
||||
}
|
||||
version_check() {
|
||||
header_write "Installed Package Versions"
|
||||
echo "::: Detecting Pi-hole installed versions."
|
||||
@ -209,21 +223,7 @@ hostnameCheck() {
|
||||
log_write "No hosts file found!"
|
||||
printf ":::\tNo hosts file found!\n"
|
||||
fi
|
||||
}
|
||||
|
||||
lsof_parse() {
|
||||
local user
|
||||
local process
|
||||
local match
|
||||
|
||||
user=$(echo ${1} | cut -f 3 -d ' ' | cut -c 2-)
|
||||
process=$(echo ${1} | cut -f 2 -d ' ' | cut -c 2-)
|
||||
if [[ ${2} -eq ${process} ]]; then
|
||||
match="as required."
|
||||
else
|
||||
match="incorrectly."
|
||||
fi
|
||||
log_echo -l "by ${user} for ${process} ${match}"
|
||||
echo ":::"
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user