mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #372 from Morlok8k/development
fix for older versions of uptime, on development branch.
This commit is contained in:
commit
1d80fdddd4
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ function normalChrono(){
|
||||||
echo " $(ifconfig eth0 | awk '/inet addr/ {print $2}' | cut -d':' -f2)"
|
echo " $(ifconfig eth0 | awk '/inet addr/ {print $2}' | cut -d':' -f2)"
|
||||||
echo ""
|
echo ""
|
||||||
uptime | cut -d' ' -f11-
|
uptime | cut -d' ' -f11-
|
||||||
uptime -p
|
#uptime -p #Doesn't work on all versions of uptime
|
||||||
|
uptime | awk -F'( |,|:)+' '{if ($7=="min") m=$6; else {if ($7~/^day/) {d=$6;h=$8;m=$9} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes."}'
|
||||||
echo "-------------------------------"
|
echo "-------------------------------"
|
||||||
# Uncomment to continually read the log file and display the current domain being blocked
|
# Uncomment to continually read the log file and display the current domain being blocked
|
||||||
#tail -f /var/log/pihole.log | awk '/\/etc\/pihole\/gravity.list/ {if ($7 != "address" && $7 != "name" && $7 != "/etc/pihole/gravity.list") print $7; else;}'
|
#tail -f /var/log/pihole.log | awk '/\/etc\/pihole\/gravity.list/ {if ($7 != "address" && $7 != "name" && $7 != "/etc/pihole/gravity.list") print $7; else;}'
|
||||||
|
|
Loading…
Reference in a new issue