A live bird collage card for your Home Assistant dashboard.
Update views.php
ehpersonal383949eff99ecd
diff --git a/homepage/views.php b/homepage/views.phpindex 30468c2f..7e8723c5 100644--- a/homepage/views.php+++ b/homepage/views.php@@ -4,7 +4,7 @@ $user = shell_exec("awk -F: '/1000/{print $1}' /etc/passwd");$home = shell_exec("awk -F: '/1000/{print $6}' /etc/passwd");$home = trim($home);if(!isset($_SESSION['behind'])) {- $_SESSION['behind'] = trim(shell_exec("sudo git -C ".$home."/BirdNET-Pi fetch > /dev/null 2>&1 && git -C ".$home."/BirdNET-Pi status | sed -n '2 p' | cut -d ' ' -f 7"));+ $_SESSION['behind'] = trim(shell_exec("sudo -u$user git -C ".$home."/BirdNET-Pi fetch > /dev/null 2>&1 && sudo -u$user git -C ".$home."/BirdNET-Pi status | sed -n '2 p' | cut -d ' ' -f 7"));}if(intval($_SESSION['behind']) >= 99) {?><style>