mirror of
https://github.com/pi-hole/pi-hole
synced 2025-02-14 17:11:59 +00:00
Skip some checks in docker container
These commands always fail in containers with "command not found" (as expected). Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
parent
733dce1c4c
commit
0590bbba2d
@ -492,13 +492,25 @@ run_and_print_command() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hardware_check() {
|
hardware_check() {
|
||||||
|
# Note: the checks are skipped if Pi-hole is running in a docker container
|
||||||
|
|
||||||
|
local skip_msg="${INFO} Not enough permissions inside Docker container ${COL_YELLOW}(skipped)${COL_NC}"
|
||||||
|
|
||||||
echo_current_diagnostic "System hardware configuration"
|
echo_current_diagnostic "System hardware configuration"
|
||||||
# Store the output of the command in a variable
|
if [ -n "${DOCKER_VERSION}" ]; then
|
||||||
run_and_print_command "lshw -short"
|
log_write "${skip_msg}"
|
||||||
|
else
|
||||||
|
# Store the output of the command in a variable
|
||||||
|
run_and_print_command "lshw -short"
|
||||||
|
fi
|
||||||
|
|
||||||
echo_current_diagnostic "Processor details"
|
echo_current_diagnostic "Processor details"
|
||||||
# Store the output of the command in a variable
|
if [ -n "${DOCKER_VERSION}" ]; then
|
||||||
run_and_print_command "lscpu"
|
log_write "${skip_msg}"
|
||||||
|
else
|
||||||
|
# Store the output of the command in a variable
|
||||||
|
run_and_print_command "lscpu"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
disk_usage() {
|
disk_usage() {
|
||||||
|
Loading…
Reference in New Issue
Block a user