patricks old code to the rescue!!
This commit is contained in:
+5
-1
@@ -31,7 +31,11 @@ fwrite($fh, $contents);
|
|||||||
fwrite($fh2, $contents2);
|
fwrite($fh2, $contents2);
|
||||||
|
|
||||||
if(strlen($apprise_input) > 0){
|
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);
|
fwrite($appriseconfig, $apprise_input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ ${NOTIFICATION}"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -s ~/.apprise ];then
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user