patricks old code to the rescue!!

This commit is contained in:
ehpersonal38
2022-05-07 13:07:49 -04:00
parent 8d774e0efa
commit f1a972b943
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -31,7 +31,11 @@ fwrite($fh, $contents);
fwrite($fh2, $contents2);
if(strlen($apprise_input) > 0){
$appriseconfig = fopen("/etc/birdnet/.apprise", "w");
$user = shell_exec("awk -F: '/1000/{print $1}' /etc/passwd");
$home = shell_exec("awk -F: '/1000/{print $6}' /etc/passwd");
$home = trim($home);
$appriseconfig = fopen($home."/BirdNET-Pi/.apprise", "w");
fwrite($appriseconfig, $apprise_input);
}
+1 -1
View File
@@ -34,7 +34,7 @@ ${NOTIFICATION}"
fi
if [ ! -s ~/.apprise ];then
$HOME/BirdNET-Pi/birdnet/bin/apprise -vv -t 'New Species Detected' -b ${NOTIFICATION} --config=/etc/birdnet/.apprise
$HOME/BirdNET-Pi/birdnet/bin/apprise -vv -t 'New Species Detected' -b ${NOTIFICATION} --config=$HOME/BirdNET-Pi/.apprise
fi
fi