Last active
May 7, 2021 02:47
-
-
Save thodoris85/b736d287899e48c36b3f81d795c0adc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -w /var/www/html/admin/scripts/pi-hole/php/header.php ]; then | |
echo ROOT OR GTFO | |
fi | |
cd /var/www/html/admin || exit 1 | |
cat <<'EOF' > pihole.uptime.patch | |
diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php | |
--- a/scripts/pi-hole/php/header.php | |
+++ b/scripts/pi-hole/php/header.php | |
@@ -312,3 +312,5 @@ if($auth) { | |
<div class="pull-left image"> | |
+ <p></p> | |
<img src="img/logo.svg" alt="Pi-hole logo" width="45" height="67" style="height: 67px;"> | |
+ <p></p> | |
</div> | |
@@ -351,6 +351,10 @@ if($auth) { | |
echo '<span id=\"temperature\"><i class="fa fa-circle text-red"></i> FTL offline</span>'; | |
} | |
?> | |
+ <br /> | |
+ <?php | |
+ echo '<span id="status"><i class="fa fa-circle text-green-light"></i> '.exec('uptime --pretty').'</a>'; | |
+ ?> | |
<br/> | |
<?php | |
echo "<span title=\"Detected $nproc cores\"><i class=\"fa fa-circle "; | |
EOF | |
git apply --ignore-space-change --ignore-whitespace pihole.uptime.patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl https://gist.githubusercontent.com/thodoris85/b736d287899e48c36b3f81d795c0adc7/raw/f35c19271c596c43dcee8f9d62bffc7804ed89b4/pihole.uptime.patch.sh | sudo sh