Pi hole

sudo pihole -up
sudo pihole setpassword
sudo reboot 
Net Change:
sudo nano -w /etc/dhcpcd.conf 
Install Pi-hole
curl -sSL https://install.pi-hole.net | bash

If you want to see the temperature in the status

After the update, the temperature information disappeared. It wasn’t too important, but I liked seeing that everything was fine.

r/pihole - If you want to see the temperature in the status

Here’s a simple guide on how to display it in the status:

sudo nano /var/www/html/admin/scripts/lua/sidebar.lp

Find the following code:

...
<div class="pull-left info">
    <p>Status</p>
    <span id="status"></span><br/>
    <span id="query_frequency"></span><br/>
    <span id="cpu"></span><br/>
    <span id="memory"></span>
</div>
...

And simply add the following line (in Fahrenheit):

<span id="temperature">&nbsp;&nbsp;<i class="fa-solid fa-temperature-three-quarters text-green-light"></i>&nbsp;&nbsp; Temp: <%= string.format("%.1f°F", (tonumber(io.open("/sys/class/thermal/thermal_zone0/temp"):read("*a")) / 1000) * 9/5 + 32) %></span><br/>

or this code if you need in Celsius:

<span id="temperature">&nbsp;&nbsp;<i class="fa-solid fa-temperature-three-quarters text-green-light"></i>&nbsp;&nbsp; Temp: <%= string.format("%.1f°C", tonumber(io.open("/sys/class/thermal/thermal_zone0/temp"):read("*a")) / 1000) %></span><br/>

Right below:

<p>Status</p>

To save the changes, press [Ctrl+S],
To exit, press [Ctrl+X].

Leave a Reply

Your email address will not be published. Required fields are marked *